I have followed multiple blogs to set-up working demo of Spring cloud Sleuth with OTEL. App ran successfully, trace and spanId are getting generated but service is not getting registered with local jaeger (dockerized) and hence not able to see any trace data.
Kindly review the configuration and help me.
Under
Dependency management
spring-boot-starter-parent=2.6.6
spring-cloud-dependencies:2021.0.1
spring-cloud-sleuth-otel-dependencies:1.1.0-M4
dependencies
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<exclusions>
<!-- Exclude Brave (the default) -->
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-brave</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-otel-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp-trace</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
<version>1.42.1</version>
</dependency>
App config(yml)
spring:
application:
name: api-service
sleuth:
otel:
exporter:
otlp:
endpoint: http://collector:6831
Docker compose
version: "3.5"
services:
api-service:
build: api-service/
image: api-service:latest
ports:
- "8080:8080"
collector:
image: jaegertracing/opentelemetry-all-in-one
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 14268:14268
- 14250:14250
- 9411:9411
I made few API calls to api-service but not able to see any trace data and service name on jaeger dashboard (http://localhost:16686).