Metrics Statsd Support

Statsd reporter for codahale/metrics with support for tags.

License

License

Categories

Categories

Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.github.jjagged
ArtifactId

ArtifactId

metrics-statsd
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Metrics Statsd Support
Statsd reporter for codahale/metrics with support for tags.
Project URL

Project URL

http://github.com/jjagged/metrics-statsd/
Source Code Management

Source Code Management

https://github.com/jjagged/metrics-statsd

Download metrics-statsd

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.jjagged/metrics-statsd/ -->
<dependency>
    <groupId>com.github.jjagged</groupId>
    <artifactId>metrics-statsd</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jjagged/metrics-statsd/
implementation 'com.github.jjagged:metrics-statsd:1.0.0'
// https://jarcasting.com/artifacts/com.github.jjagged/metrics-statsd/
implementation ("com.github.jjagged:metrics-statsd:1.0.0")
'com.github.jjagged:metrics-statsd:jar:1.0.0'
<dependency org="com.github.jjagged" name="metrics-statsd" rev="1.0.0">
  <artifact name="metrics-statsd" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jjagged', module='metrics-statsd', version='1.0.0')
)
libraryDependencies += "com.github.jjagged" % "metrics-statsd" % "1.0.0"
[com.github.jjagged/metrics-statsd "1.0.0"]

Dependencies

compile (3)

Group / Artifact Type Version
com.codahale.metrics : metrics-core jar 3.0.1
org.slf4j : slf4j-api jar 1.7.5
com.google.code.findbugs : jsr305 jar 2.0.1

test (4)

Group / Artifact Type Version
org.slf4j : slf4j-jdk14 jar 1.7.5
junit : junit-dep jar 4.10
org.mockito : mockito-all jar 1.9.0
org.easytesting : fest-assert-core jar 2.0M10

Project Modules

There are no modules declared in this project.

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) and Mike Keesey's [metrics-statsd] (https://github.com/ReadyTalk/metrics-statsd), with added support for metric tags on the reporter level.

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.

final Statsd statsd = new Statsd("localhost", port);

StatsdReporter reporter StatsdReporter.forRegistry(registry)
        .prefixedWith("foo")
        .withTags("My", "tag")
        .convertDurationsTo(TimeUnit.MILLISECONDS)
        .convertRatesTo(TimeUnit.SECONDS)
        .filter(MetricFilter.ALL)
        .build(statsd);
reporter.start(15, TimeUnit.SECONDS);

Setting Up Maven

Maven Repositories

Not in a repository yet, working on that.

Dependency

<dependencies>
    <dependency>
        <groupId>com.github.jjagged</groupId>
        <artifactId>metrics-statsd</artifactId>
        <version>${metrics-statsd.version}</version>
    </dependency>
</dependencies>

Versions

Version
1.0.0