Member-only story
Spring Boot 3x gRPC App — Enable Distributed Tracing using Micrometer, OpenTelemetry And Jaeger
4 min readApr 9, 2023
Prequel: Please check my another blog for in detail coverage of lot of this setup:
Spring Boot 3x App — Enable Distributed Tracing using Micrometer, OpenTelemetry And Jaeger
In this blog, we will quickly recap the dependency changes along with application.yml
, code (main + test), and log XML configurations, all explained in the above ☝ blog, which covers enabling Distributed Tracing for a Spring Boot App using OpenTelemetry, Micrometer And Jaeger. Then, we will supplement the setup to work with a gRPC Spring Boot App.
RECAP
- Dependencies (
pom.xml
)
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-otel</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>
- Code Configuration
import io.opentelemetry.context.propagation.TextMapPropagator;
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
import io.opentelemetry.extension.trace.propagation.JaegerPropagator;
import io.opentelemetry.sdk.trace.export.SpanExporter;
import…