Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.09 KB

File metadata and controls

28 lines (21 loc) · 1.09 KB

Micrometer integration for Jaeger internal metrics

This module brings a Micrometer integration to the internal Jaeger metrics.

Configuring

To configure the Micrometer integration, a custom Jaeger Tracer instance has to be used:

MicrometerMetricsFactory metricsReporter = new MicrometerMetricsFactory();
Configuration configuration = new Configuration("myServiceName");
Tracer tracer = configuration
    .getTracerBuilder()
    .withMetricsFactory(metricsReporter)
    .build();

After that, just use Micrometer's API to get the data into a concrete backend via the registry mechanism. For Prometheus, it means using a code like the following:

PrometheusMeterRegistry registry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
io.micrometer.core.instrument.Metrics.addRegistry(registry);

Once metric data has been captured, registry.scrape() can be used in an endpoint accessed by Prometheus. Refer to the Micrometer's documentation on the appropriate way to achieve that.