You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jomin7 (via GitHub)" <gi...@apache.org> on 2026/04/29 15:53:09 UTC
[PR] Add Grafana stack with Prometheus and Tempo to observability [camel-quarkus-examples]
jomin7 opened a new pull request, #499:
URL: https://github.com/apache/camel-quarkus-examples/pull/499
Closes #8304 Add Grafana observability stack with Prometheus and Tempo to observability example
Changes:
- Add docker-compose-grafana.yml with Grafana, Prometheus, and Tempo services
- Add pre-configured Grafana dashboard showing:
* Custom application metrics (greeting counters, timer)
* Camel route metrics (exchanges by route, exchange rates)
* Distributed tracing with Tempo integration
* JVM metrics (memory, CPU, GC)
- Add Prometheus configuration to scrape metrics from the application
- Add Tempo configuration for OTLP trace ingestion
- Configure Grafana datasources and dashboard auto-provisioning
- Expand README with comprehensive documentation:
* Docker Compose quick start guide
* Tracing setup for dev mode, Docker Compose, and cloud deployments
* Dashboard usage and contents overview
- Configure OTLP endpoint in application.properties for trace export
The observability stack runs with static ports for easy access:
- Grafana: http://localhost:3000 (admin/admin)
- Prometheus: http://localhost:9090
- Tempo: http://localhost:3200
<img width="1917" height="991" alt="image" src="https://github.com/user-attachments/assets/6668c417-f1d5-4127-b837-b7f5156ce5ee" />
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Closes #8304 Add Grafana stack with Prometheus and Tempo to observability [camel-quarkus-examples]
Posted by "llowinge (via GitHub)" <gi...@apache.org>.
llowinge commented on PR #499:
URL: https://github.com/apache/camel-quarkus-examples/pull/499#issuecomment-4368800935
@jomin7 Do you think you could add the image from the description (you can remove your personal chrome tabs if you wish) somewhere directly to the README, i think it could attract better? @jamesnetherton wdyt?
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Grafana stack with Prometheus and Tempo to observability [camel-quarkus-examples]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #499:
URL: https://github.com/apache/camel-quarkus-examples/pull/499#discussion_r3166184405
##########
observability/README.adoc:
##########
@@ -146,27 +146,155 @@ You can also directly leverage MicroProfile Health APIs to create checks. Class
To be able to diagnose problems in Camel Quarkus applications, it's useful to instrument method calls, HTTP interactions etc with OpenTelemetry.
-If you are running example in the Development mode, then Observability dev service is enabled (for more information, visit https://quarkus.io/guides/observability-devservices-lgtm[Observability Dev Services with Grafana OTel LGTM]).
-Observability dev service will run OTel collector in the background and the `quarkus.otel.exporter.otlp.endpoint` property is automatically set to the OTel collector endpoint as seen from the outside of the Docker container.
+This example is pre-configured to send traces to Tempo via OTLP on `http://localhost:4317`. The behavior differs based on how you run the application:
-In production you would rather configure real OTel collector and you would configure the OpenTelemetry exporter in `application.properties` as follows:
+==== Dev Mode (quarkus:dev)
+
+When running `mvn clean compile quarkus:dev`, the Quarkus Observability dev service is automatically enabled (see https://quarkus.io/guides/observability-devservices-lgtm[Observability Dev Services with Grafana OTel LGTM]).
+
+The dev service automatically:
+- Starts a Grafana LGTM container with Tempo for tracing
+- Overrides the `quarkus.otel.exporter.otlp.traces.endpoint` property to point to the dev service container
+- Assigns a random port to Grafana (check logs for `grafana.endpoint=http://localhost:XXXXX`)
+
+To view traces in dev mode, find the Grafana endpoint in logs and browse to it.
+
+==== Docker Compose Mode (Recommended)
+
+When running the packaged application with Docker Compose (see Grafana Dashboards section above), traces are sent to the Tempo container at `localhost:4317`.
+
+The OpenTelemetry configuration in `application.properties` is already set:
[source, text]
----
-# We are using a property placeholder to be able to use this example in convenient way in a cloud environment
-quarkus.otel.exporter.otlp.traces.endpoint = http://${TELEMETRY_COLLECTOR_COLLECTOR_SERVICE_HOST:localhost}:4317
-# To enable tracing (it is disabled by default via camel-quarkus-observability-services)
+quarkus.otel.exporter.otlp.traces.endpoint = http://localhost:4317
quarkus.otel.sdk.disabled=false
----
+Traces are automatically visible in Grafana at http://localhost:3000.
+
+==== Cloud/Kubernetes Deployment
+
+For cloud or Kubernetes deployments, override the OTLP endpoint using an environment variable:
+
+[source, shell]
+----
+export QUARKUS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://tempo-service:4317
+----
+
+Or use property placeholders in `application.properties`:
+
+[source, text]
+----
+quarkus.otel.exporter.otlp.traces.endpoint = http://${TEMPO_HOST:localhost}:4317
+----
+
NOTE: For information about other OpenTelemetry exporters, refer to the Camel Quarkus OpenTelemetry https://camel.apache.org/camel-quarkus/next/reference/extensions/opentelemetry.html#extensions-opentelemetry-usage-exporters[extension documentation].
-To view tracing events find `grafana.endpoint` in your log (it will use random port) browse to eg. http://localhost:32768.
-Then follow instructions at https://quarkus.io/guides/observability-devservices-lgtm#explore.
+==== Understanding Traces
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 8 spans showing the progression of the message exchange through each endpoint.
+=== Grafana Dashboards
+
+This example includes a pre-configured Grafana dashboard to visualize metrics, distributed traces, and JVM statistics.
+
+==== Quick Start with Docker Compose (Recommended)
+
+The easiest way to visualize the dashboard with working metrics is using Docker Compose with static ports:
+
+[source,shell]
+----
+# Start the observability stack (Grafana, Prometheus, Tempo)
+$ docker-compose -f src/main/docker/docker-compose-grafana.yml up -d
Review Comment:
Nitpick - Replace references to `docker-compose` with `docker compose`. It's the preferred way of running it now IIRC.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Closes #8304 Add Grafana stack with Prometheus and Tempo to observability [camel-quarkus-examples]
Posted by "jomin7 (via GitHub)" <gi...@apache.org>.
jomin7 commented on PR #499:
URL: https://github.com/apache/camel-quarkus-examples/pull/499#issuecomment-4378011136
> @jomin7 Do you think you could add the image from the description (you can remove your personal chrome tabs if you wish) somewhere directly to the README, i think it could attract better? @jamesnetherton wdyt?
@llowinge Good suggestion! I'll add the screenshot to the README in the next commit.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Grafana stack with Prometheus and Tempo to observability [camel-quarkus-examples]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton merged PR #499:
URL: https://github.com/apache/camel-quarkus-examples/pull/499
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Grafana stack with Prometheus and Tempo to observability [camel-quarkus-examples]
Posted by "jomin7 (via GitHub)" <gi...@apache.org>.
jomin7 commented on code in PR #499:
URL: https://github.com/apache/camel-quarkus-examples/pull/499#discussion_r3166510695
##########
observability/README.adoc:
##########
@@ -146,27 +146,155 @@ You can also directly leverage MicroProfile Health APIs to create checks. Class
To be able to diagnose problems in Camel Quarkus applications, it's useful to instrument method calls, HTTP interactions etc with OpenTelemetry.
-If you are running example in the Development mode, then Observability dev service is enabled (for more information, visit https://quarkus.io/guides/observability-devservices-lgtm[Observability Dev Services with Grafana OTel LGTM]).
-Observability dev service will run OTel collector in the background and the `quarkus.otel.exporter.otlp.endpoint` property is automatically set to the OTel collector endpoint as seen from the outside of the Docker container.
+This example is pre-configured to send traces to Tempo via OTLP on `http://localhost:4317`. The behavior differs based on how you run the application:
-In production you would rather configure real OTel collector and you would configure the OpenTelemetry exporter in `application.properties` as follows:
+==== Dev Mode (quarkus:dev)
+
+When running `mvn clean compile quarkus:dev`, the Quarkus Observability dev service is automatically enabled (see https://quarkus.io/guides/observability-devservices-lgtm[Observability Dev Services with Grafana OTel LGTM]).
+
+The dev service automatically:
+- Starts a Grafana LGTM container with Tempo for tracing
+- Overrides the `quarkus.otel.exporter.otlp.traces.endpoint` property to point to the dev service container
+- Assigns a random port to Grafana (check logs for `grafana.endpoint=http://localhost:XXXXX`)
+
+To view traces in dev mode, find the Grafana endpoint in logs and browse to it.
+
+==== Docker Compose Mode (Recommended)
+
+When running the packaged application with Docker Compose (see Grafana Dashboards section above), traces are sent to the Tempo container at `localhost:4317`.
+
+The OpenTelemetry configuration in `application.properties` is already set:
[source, text]
----
-# We are using a property placeholder to be able to use this example in convenient way in a cloud environment
-quarkus.otel.exporter.otlp.traces.endpoint = http://${TELEMETRY_COLLECTOR_COLLECTOR_SERVICE_HOST:localhost}:4317
-# To enable tracing (it is disabled by default via camel-quarkus-observability-services)
+quarkus.otel.exporter.otlp.traces.endpoint = http://localhost:4317
quarkus.otel.sdk.disabled=false
----
+Traces are automatically visible in Grafana at http://localhost:3000.
+
+==== Cloud/Kubernetes Deployment
+
+For cloud or Kubernetes deployments, override the OTLP endpoint using an environment variable:
+
+[source, shell]
+----
+export QUARKUS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://tempo-service:4317
+----
+
+Or use property placeholders in `application.properties`:
+
+[source, text]
+----
+quarkus.otel.exporter.otlp.traces.endpoint = http://${TEMPO_HOST:localhost}:4317
+----
+
NOTE: For information about other OpenTelemetry exporters, refer to the Camel Quarkus OpenTelemetry https://camel.apache.org/camel-quarkus/next/reference/extensions/opentelemetry.html#extensions-opentelemetry-usage-exporters[extension documentation].
-To view tracing events find `grafana.endpoint` in your log (it will use random port) browse to eg. http://localhost:32768.
-Then follow instructions at https://quarkus.io/guides/observability-devservices-lgtm#explore.
+==== Understanding Traces
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 8 spans showing the progression of the message exchange through each endpoint.
+=== Grafana Dashboards
+
+This example includes a pre-configured Grafana dashboard to visualize metrics, distributed traces, and JVM statistics.
+
+==== Quick Start with Docker Compose (Recommended)
+
+The easiest way to visualize the dashboard with working metrics is using Docker Compose with static ports:
+
+[source,shell]
+----
+# Start the observability stack (Grafana, Prometheus, Tempo)
+$ docker-compose -f src/main/docker/docker-compose-grafana.yml up -d
Review Comment:
Thank you for the note. I will update the references from docker-compose to docker compose to align with the current preferred syntax.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org