Skip to content

Instantly share code, notes, and snippets.

@Dalamar42
Last active October 20, 2016 17:11
Show Gist options
  • Save Dalamar42/164a5959e29a0df115af6bdc6b68416c to your computer and use it in GitHub Desktop.
Save Dalamar42/164a5959e29a0df115af6bdc6b68416c to your computer and use it in GitHub Desktop.
MetricRegistry metrics = new MetricRegistry();
GraphiteReporter reporter = GraphiteReporter.forRegistry(metrics)
.prefixedWith(metricPrefix)
.build(new Graphite(graphiteHost, graphitePort));
reporter.start(reportingPeriod, TimeUnit.MINUTES);
Meter meter = metrics.meter(meterName);
for (int i = 0; i < 10; i++) {
meter.mark();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment