Skip to content
share library_books

Coda Hale Metrics Reporter

Sematext-metrics-reporter is an extension for theCoda Hale Metricslibrary version 2.2.0 and 3.x for sending metrics to SPM. Under the hood sematext-metrics Java library is used to send metrics asCustom Metrics to SPM.

Quick Start

To start sending metrics just create and start SematextMetricsReporter:

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);