Giter Site home page Giter Site logo

dropwizard-prometheus's Introduction

dropwizard-prometheus

The dropwizard codahale metrics exporter for prometheus.

Easy metrics reporting for Prometheus monitoring server.

It is a simple framework in form of java agent for exporting dropwizard realtime metrics like Timer, Gauge and Histogram.

If you have dropwizard metrics being used for monitoring various kinds of information and then want to use it with prometheus, then exporting the metrics in the prometheus form would be difficult. This project which uses java agent to instrument your code so that the dropwizard metrics are converted into prometheus format and sent over to prometheus for easy visualization and alerting using the prometheus server.

Overview

The javaagent takes each method which has annotations such as Timed, Gauge, Counted, ExceptionMetered and inserts code specific to the prometheus where the different calculations are done and emitted to the port where prometheus scrapes the metric from. The prometheus java simple client is used to transform the codahale metrics into prometheus format.

The metric names are taken as classname.methodname.metricname

Annotations instrumented include:

Timed

Counted

Gauge --> Each class will have a gauge metric and all the methods are which have gauge annotation will appear as sub labels underneath the class metric in the prometheus.

ExceptionMetered

Running the java agent

mvn clean package will build the uber jar.

java -javaagent:/target/dropwizard-prometheus-0.0.1-SNAPSHOT.jar=prometheus.listener.port:1024\-cp '<path-to-your-class-files' \<your-main-class>or<jar> will start the background jetty instance and starts reporting metrics to prometheus.

The listener port is a mandatory argument.

License

Dropwizard-Prometheus project is licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

dropwizard-prometheus's People

Contributors

san213 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.