Skip to content


Subversion checkout URL

You can clone with
Download ZIP

This branch is 63 commits ahead, 3 commits behind vistarmedia:master

Metrics Datadog Reporter

Simple Metrics reporter backend that sends metrics to DataDog.


This project is in the process of being deprecated. If you would like to use this project, all features here have been merged to Coursera's fork. Coursera's fork has also been released to Maven Central.


import com.codahale.metrics.datadog.DatadogReporter

final Datadog datadog = new Datadog(apiKey, applicationKey)
final DatadogReporter reporter = DatadogReporter.forRegistry(registry)

reporter.start(1, TimeUnit.MINUTES);

The hostname provided with each publish needs to match the hostname defined in the /etd/dd-agent/datadog.conf file that configures the DataDog agent. This is so that the metrics being pushed directly to datadog via this library can be associated with other (box-level) metrics being pushed by the agent.

Dropwizard Metrics Reporter

If you have a dropwizard project and have at least dropwizard-core 0.7.X, then you can just add this to your dropwizard YAML configuration file.

  frequency: 1 minute                       # Default is 1 second.
    - type: datadog
      host: <host>
      tags: <tags>                          # Optional.
      apiKey: <apiKey>
      applicationKey: <applicationKey>      # Optional
      includes:                             # Optional. Defaults to (all).
      excludes:                             # Optional. Defaults to (none).

If you want to whitelist only a few metrics, you can use the includes key to create a set of metrics to include.

  frequency: 1 minute                       # Default is 1 second.
    - type: datadog
      host: <host>
      tags: <tags>
      apiKey: <apiKey>
      applicationKey: <applicationKey>      # Optional
        - jvm.
        - ch.

The check is very simplistic so be as specific as possible. For example, if you have "jvm.", the filter will check if the includes has that value in any part of the metric name (not just the beginning).

Something went wrong with that request. Please try again.