This project is a quick example to showcase Distributed Tracing in a Spring Boot application using Micrometer and OpenTelemetry.
Read the accomanying blog post - Distributed Tracing with Spring Boot 3 - Micrometer vs OpenTelemetry
There are 2 tracing scenarios - HTTP and Apache Kafka.
- HTTP Service 1 makes a GET call to HTTP Service 2.
- HTTP Service 2 makes a GET call to whatthecommit.com.
- HTTP Service 2 returns the response from whatthecommit.com back to HTTP Service 1.
- Kafka Producer makes a GET call to whatthecommit.com.
- Kafka Producer produces the response from Step 1 to Apache Kafka.
- Kafka Consumer consumes the message from Apache Kafka.
- After consumption, Kafka Consumer store the record in H2 in-memory DB.
For each scenario, there are two implementations - Micrometer Tracing and OpenTelemetry Auto Instrumentation.
- The folder otel-http-micrometer demonstrates Micrometer tracing of HTTP services communication.
- The folder otel-http-opentelemetry demonstrates OTEL Auto Instrumentation tracing of HTTP services communication.
- The folder otel-kafka-micrometer demonstrates Micrometer tracing of Kafka services communication.
- The folder otel-kafka-opentelemetry demonstrates OTEL Auto Instrumentation tracing of Kafka services communication.
- The folder otel-http-micrometer-native demonstrates Micromter tracing of HTTP services communication with Spring native GraalVM.
- The folder otel-http-opentelemetry-native demonstrates OTEL tracing of HTTP services communication with Spring native GraalVM without using the Java agent.
- The folder otel-kafka-opentelemetry-native demonstrates OTEL tracing of Kafka and DB services communication with Spring native GraalVM without using the Java agent.
Visit the folder to get more details about building and running the application.