Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sematext-metrics-reporter is opensource Codahale Metrics Library extension an extension for the Coda Hale Metrics library version 2.2.0 and 3.x for sending metrics to SPM.

Quick

...

Start

To start sending metrics , gathered by metrics library, just create and start SematextMetricsReporter.:

Code Block
languagejava
MetricRegistry metrics = new MetricRegistry();

SematextClient.initialize("[spm- token] here");
SematextMetricsReporter reporter = SematextMetricsReporter.forClient(SematextClient.client())
  .withFilter(MetricFilter.ALL)
  .withRegistry(metrics)
  .withDurationUnit(TimeUnit.MILLISECONDS)
  .build();

reporter.start(1, TimeUnit.MINUTES);