beskow commented on code in PR #22675: URL: https://github.com/apache/camel/pull/22675#discussion_r3106384172
########## components/camel-opentelemetry2/src/main/docs/opentelemetry2.adoc: ########## @@ -110,6 +110,78 @@ As an alternative, you can use the agent's built-in MDC integration. . Enable the https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/logger-mdc-instrumentation.md[Logger MDC auto-instrumentation]. This automatically adds `trace_id` and `span_id` to the MDC. . Configure your logging framework to include these MDC keys in your log format. The exact configuration depends on the logging library you use. +[[OpenTelemetry-SpringBoot-starter]] +=== Using the OpenTelemetry Spring Boot starter + +An alternative to the OpenTelemetry agent is to use https://opentelemetry.io/docs/zero-code/java/spring-boot-starter/[OpenTelemetry Spring Boot starter]. + +To ensure version alignment across all OpenTelemetry dependencies, you should +import the opentelemetry-instrumentation-bom BOM: + +[source,xml] +---- +<dependencyManagement> + <dependencies> + <dependency> + <groupId>io.opentelemetry.instrumentation</groupId> + <artifactId>opentelemetry-instrumentation-bom</artifactId> + <version>2.26.1</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> +</dependencyManagement> +---- + +Then add the following dependency for the OpenTelemetry Spring Boot starter: + +[source,xml] +---- +<dependency> + <groupId>io.opentelemetry.instrumentation</groupId> + <artifactId>opentelemetry-spring-boot-starter</artifactId> +</dependency> +---- + +The starter auto-configures most aspects of the OpenTelemetry instrumentation, with two exceptions: +No `Tracer` or ContextPropagators` beans are autoconfigured, they need to be configured manually: Review Comment: Thanks, fixed! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
