I have a microservice, want to send traces, logs and metrics of the service to opentelemetry collector. I have used below dependencies(maven)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<exclusions>
<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</artifactId>
<version>1.23.1</version>
</dependency>
It did not work, i have tried creating opentelemetrysdk and autoconfigure bean still no result. Is spring recommending any specific otel configuration dependency? How to configure an otel to spring boot project?
Comment From: wilkinsona
Given that you're using Spring Cloud Sleuth, you must also be using Spring Boot 2.x which is no longer supported. Please upgrade to Spring Boot 3.2.x or later where tracing is supported without using Sleuth.
If you have any further questions, please follow up on Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.
Comment From: Venkatapathinaidu
Hi @wilkinsona,
The project is configured with 3.2.x spring boot, i have removed sleuth and added io.micrometer:micrometer-tracing-bridge-otel and io.opentelemetry:opentelemetry-exporter-otlp to pom as suggested by spring boot document. Are otel beans autoconfigured here? spring doc says Use the management.otlp.tracing.* configuration properties to configure reporting using OTLP. what does it mean? Should i create a bean for properties or can i add properties under application.properties/environment variables?
Comment From: wilkinsona
As I said above, please ask questions on Stack Overflow.