You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2023/07/04 14:28:59 UTC
[camel-quarkus-examples] branch camel-quarkus-main updated: Improve Tracing docs
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git
The following commit(s) were added to refs/heads/camel-quarkus-main by this push:
new 6700342 Improve Tracing docs
6700342 is described below
commit 6700342b2329bb07702f233fba791585b4908726
Author: Lukas Lowinger <ll...@redhat.com>
AuthorDate: Tue Jul 4 14:22:16 2023 +0200
Improve Tracing docs
---
observability/README.adoc | 26 +++++++++++-----------
.../src/main/resources/application.properties | 2 --
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/observability/README.adoc b/observability/README.adoc
index 990301a..6e5f073 100644
--- a/observability/README.adoc
+++ b/observability/README.adoc
@@ -124,27 +124,27 @@ You can also directly leverage MicroProfile Health APIs to create checks. Class
=== Tracing
-The tracing configuration for the application can be found within `application.properties`.
+To be able to diagnose problems in Camel Quarkus applications, you can start tracing messages.
+We will use OpenTelemetry standard suited for cloud environments.
-The default configuration uses the OTLP exporter, but it can be easily switched to the Jaeger exporter by applying this change in `application.properties`:
+All you need is to add the `camel-quarkus-opentelemetry` dependency (see link:pom.xml#L101-L104[pom.xml]):
-[source,shell]
+[source, xml]
----
-- quarkus.otel.exporter.otlp.traces.endpoint=http://localhost:4317
-+ quarkus.otel.exporter.jaeger.traces.endpoint=http://localhost:14250
+<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-opentelemetry</artifactId>
+</dependency>
----
-and this change in `pom.xml`:
+and configure (we are using placeholder to be able to test this example in convenient way in cloud environment) the exporter (see link:src/main/resources/application.properties#L28[application.properties]) :
-[source,xml]
+[source, text]
----
- <dependency>
- <groupId>io.quarkus</groupId>
-- <artifactId>quarkus-opentelemetry-exporter-otlp</artifactId>
-+ <artifactId>quarkus-opentelemetry-exporter-jaeger</artifactId>
- </dependency>
+quarkus.otel.exporter.otlp.traces.endpoint = http://${TELEMETRY_COLLECTOR_COLLECTOR_SERVICE_HOST:localhost}:4317
----
+NOTE: For further information eg. about other exporters, please follow https://camel.apache.org/camel-quarkus/next/reference/extensions/opentelemetry.html#extensions-opentelemetry-usage[usage] part of Camel Quarkus Opentelemetry extension documentation.
To view tracing events, start a tracing server. A simple way of doing this is with Docker Compose:
@@ -156,7 +156,7 @@ $ docker-compose up -d
With the server running, browse to http://localhost:16686. Then choose 'camel-quarkus-observability' from the 'Service' drop down and click the 'Find Traces' button.
The `platform-http` consumer route introduces a random delay to simulate latency, hence the overall time of each trace should be different. When viewing a trace, you should see
-a hierarchy of 3 spans showing the progression of the message exchange through each endpoint.
+a hierarchy of 6 spans showing the progression of the message exchange through each endpoint.
=== Package and run the application
diff --git a/observability/src/main/resources/application.properties b/observability/src/main/resources/application.properties
index 1007fa2..2ce095e 100644
--- a/observability/src/main/resources/application.properties
+++ b/observability/src/main/resources/application.properties
@@ -26,8 +26,6 @@ quarkus.application.name = camel-quarkus-observability
# For OTLP
quarkus.otel.exporter.otlp.traces.endpoint = http://${TELEMETRY_COLLECTOR_COLLECTOR_SERVICE_HOST:localhost}:4317
-# For Jaeger
-# quarkus.otel.exporter.jaeger.traces.endpoint = http://${MY_JAEGER_COLLECTOR_SERVICE_HOST:localhost}:14250
#
# Camel