Skip to content

Statsd reporter for codahale/metrics with support to StatsD over UDP and TCP.

License

Notifications You must be signed in to change notification settings

mayconbordin/metrics-statsd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metrics-statsd

Statsd reporter for [codahale/metrics] (https://github.com/codahale/metrics), based on Sean Laurent's [metrics-statsd] (https://github.com/organicveggie/metrics-statsd), Mike Keesey's [metrics-statsd] (https://github.com/ReadyTalk/metrics-statsd) and Hannes Heijkenskjöld [metrics-statsd] (https://github.com/jjagged/metrics-statsd), with added support for the TCP protocol.

Only version 3.x of the Metrics library is supported.

Quick Start

The 3.x version of the Metrics library uses the builder pattern to construct reporters. Below is an example of how to create a StatsdReporter and report out metrics every 15 seconds.

StatsDReporter reporter = StatsDReporter.forRegistry(registry)
        .prefixedWith("foo")
        .convertDurationsTo(TimeUnit.MILLISECONDS)
        .convertRatesTo(TimeUnit.SECONDS)
        .filter(MetricFilter.ALL)
        .build("localhost", 8125, "tcp");

reporter.start(15, TimeUnit.SECONDS);

About

Statsd reporter for codahale/metrics with support to StatsD over UDP and TCP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%