This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new c36edf0  Improve documentation for OpenTelemetry component (#7019)
c36edf0 is described below

commit c36edf05ef38a38dec9050f3493c264a6d33c18c
Author: stn1slv <devya...@gmail.com>
AuthorDate: Tue Feb 22 20:57:33 2022 +0300

    Improve documentation for OpenTelemetry component (#7019)
    
    * Add Spring Boot and java agent details
    
    Added required step for Spring Boot and how to use OpenTelemetry agent
    
    * Change section name to Configuration
---
 .../src/main/docs/opentelemetry.adoc               | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/components/camel-opentelemetry/src/main/docs/opentelemetry.adoc 
b/components/camel-opentelemetry/src/main/docs/opentelemetry.adoc
index 16d3e1b..a4a332b3 100644
--- a/components/camel-opentelemetry/src/main/docs/opentelemetry.adoc
+++ b/components/camel-opentelemetry/src/main/docs/opentelemetry.adoc
@@ -51,6 +51,35 @@ otelTracer.setTracer(...);
 otelTracer.init(camelContext);
 
--------------------------------------------------------------------------------------------------
 
+== Spring Boot
+
+If you are using Spring Boot then you can add
+the `camel-opentelemetry-starter` dependency, and turn on OpenTracing by 
annotating
+the main class with `@CamelOpenTelemetry`.
+
+The `OpenTelemetryTracer` will be implicitly obtained from the camel context's 
`Registry`, unless
+a `OpenTelemetryTracer` bean has been defined by the application.
+
+== Java Agent
+Download the 
https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/[latest
 version].
+
+This package includes the instrumentation agent as well as instrumentations 
for all supported libraries and all available data exporters.
+The package provides a completely automatic, out-of-the-box experience.
+
+Enable the instrumentation agent using the `-javaagent` flag to the JVM.
+```
+java -javaagent:path/to/opentelemetry-javaagent.jar \
+     -jar myapp.jar
+```
+By default, the OpenTelemetry Java agent uses 
https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/otlp[OTLP
 exporter] configured to send data to 
https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/otlpreceiver/README.md[OpenTelemetry
 collector] at `http://localhost:4317`.
+
+Configuration parameters are passed as Java system properties (`-D` flags) or 
as environment variables. See 
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/agent-config.md[the
 configuration documentation] for the full list of configuration items. For 
example:
+```
+java -javaagent:path/to/opentelemetry-javaagent.jar \
+     -Dotel.service.name=your-service-name \
+     -Dotel.traces.exporter=jaeger \
+     -jar myapp.jar
+```
 
 include::spring-boot:partial$starter.adoc[]
 

Reply via email to