Skip to content

Java

To send data to Tornimo, you need to add dropwizard dependency to your dependency manager config (maven/gradle).

We also provide a plugin for Spring 2 metrics collector called Micrometer. For details go here.

Maven dependency

<dependency>
  <groupId>io.dropwizard.metrics</groupId>
  <artifactId>metrics-graphite</artifactId>
  <version>4.0.5</version>
</dependency>

Gradle dependency

compile group: 'io.dropwizard.metrics', name: 'metrics-graphite', version: '4.0.5'

Example showing how to send some meter metric using Dropwizard api.

final MetricRegistry registry = new MetricRegistry();
final Graphite graphite = new Graphite(new InetSocketAddress(YOUR_TORNIMO_PUSH_URL, 2003));
final GraphiteReporter reporter = GraphiteReporter.forRegistry(registry)
        .prefixedWith(YOUR_TORNIMO_TOKEN + ".your.example.prefix")
        .build(graphite);

reporter.start(1, TimeUnit.MINUTES);
registry.meter("example.meter").mark();