Metrics Statsd Support

Statsd reporter for codahale/metrics.

License

License

Categories

Categories

Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.basistech
ArtifactId

ArtifactId

metrics-statsd
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

bundle
Description

Description

Metrics Statsd Support
Statsd reporter for codahale/metrics.
Project URL

Project URL

http://github.com/basis-technology-corp/metrics-statsd/
Project Organization

Project Organization

Basis Technology Corp.
Source Code Management

Source Code Management

http://github.com/basis-technology-corp/metrics-statsd/

Download metrics-statsd

Dependencies

compile (2)

Group / Artifact Type Version
io.dropwizard.metrics : metrics-core jar 3.1.0
org.slf4j : slf4j-api jar 1.7.5

test (3)

Group / Artifact Type Version
org.slf4j : slf4j-jdk14 jar 1.7.5
junit : junit jar 4.12
org.mockito : mockito-all jar 1.9.0

Project Modules

There are no modules declared in this project.

metrics-statsd

Statsd reporter for [codahale/metrics] (https://github.com/codahale/metrics).

Quick Start

The 3.x version of the Metrics library now 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")
        .convertDurationsTo(TimeUnit.MILLISECONDS)
        .convertRatesTo(TimeUnit.SECONDS)
        .filter(MetricFilter.ALL)
        .build(statsd);
reporter.start(15, TimeUnit.SECONDS);

If you are using Dropwizard (0.7.x +), there is an easy way to configure a Metrics reporter to be used directly from your YAML configuration file. See (https://github.com/dropwizard/dropwizard/tree/master/dropwizard-metrics-graphite) for an example of how to create a ReporterFactory.

Important Notes

Package Name & GroupId

As part of getting metrics-statsd ready for publishing to Maven Central, the Maven groupId changed from studyblue to com.bealetech. In addition, as of v2.3.0, the package name changed from com.studyblue to com.bealetech.

Version Numbers

Versions 2.1.3.0 and earlier directly matched the versioning of official releases of codahale/metrics. Future versions, starting with 2.2.0, will no longer match.

Setting Up Maven

Maven Repositories

Snapshots: https://oss.sonatype.org/content/repositories/snapshots
Releases: https://oss.sonatype.org/content/groups/public

Dependency

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

Compatability with metrics

metrics-statsd version metrics version
3.0.x 3.0.1
2.3.x 2.1.x
2.2.x 2.1.x
2.1.3 2.1.x

License

Copyright (c) 2012-2013 Sean Laurent

Published under Apache Software License 2.0, see LICENSE

com.basistech

Basis Technology Corporation

Versions

Version
3.0.0