Metrics Support for Jaeger

Integrate the metrics from Jaeger tracing into your Helidon SE application simply by adding a dependency.

Overview

As the Helidon Jaeger Tracing document describes, you can use Jaeger tracing in your Helidon SE application.

Jaeger maintains several metrics about its own activity (briefly outlined in the Jaeger client documentation). This document explains how you can integrate those Jaeger tracing metrics with Helidon’s metrics.

Prerequisites

Your pom.xml file should already contain the dependency for Helidon-Jaeger tracing integration.

To enable integration with Jaeger’s metrics, add the following dependency:

<dependency>
    <groupId>io.helidon.metrics</groupId>
    <artifactId>helidon-metrics-jaeger</artifactId>
    <scope>runtime</scope>
</dependency>
Copied

You can leave your application’s Java code unchanged. By adding this dependency, you instruct Helidon to monitor the Jaeger tracing metrics internally and to publish them using the Helidon metrics system.

Rebuild and start your application.

Accessing Jaeger Tracing Metrics

Submit a few requests to your application’s endpoints. This causes Jaeger to update its internal metrics.

Then, when you access your application’s metrics endpoint (/metrics by default), Helidon displays the updated Jaeger tracing metrics as part of the vendor metrics section.

curl -H "Accept: application/json" -X GET http://localhost:8080/metrics/vendor
Copied
Partial Helidon Metrics vendor Output Showing Jaeger Metrics
 ... "jaeger_tracer_baggage_restrictions_updates;result=err": 0,
  "jaeger_tracer_baggage_restrictions_updates;result=ok": 0,
  "jaeger_tracer_baggage_truncations": 0,
  "jaeger_tracer_baggage_updates;result=err": 0,
  "jaeger_tracer_baggage_updates;result=ok": 0,
  "jaeger_tracer_finished_spans": 0,
  "jaeger_tracer_reporter_queue_length": 0,
  "jaeger_tracer_reporter_spans;result=dropped": 0,
  "jaeger_tracer_reporter_spans;result=err": 0,
  "jaeger_tracer_reporter_spans;result=ok": 0,
  "jaeger_tracer_sampler_queries;result=err": 1,
  "jaeger_tracer_sampler_queries;result=ok": 0,
  "jaeger_tracer_sampler_updates;result=err": 0,
  "jaeger_tracer_sampler_updates;result=ok": 0,
  "jaeger_tracer_span_context_decoding_errors": 0,
  "jaeger_tracer_started_spans;sampled=n": 15,
  "jaeger_tracer_started_spans;sampled=y": 0,
  "jaeger_tracer_traces;sampled=n;state=joined": 2,
  "jaeger_tracer_traces;sampled=n;state=started": 3,
  "jaeger_tracer_traces;sampled=y;state=joined": 0,
  "jaeger_tracer_traces;sampled=y;state=started": 0,
...
Copied

Helidon publishes whatever metrics Jaeger creates.