Skip to content

Commit

Permalink
Fix example for ability to use Jaeger exporter only
Browse files Browse the repository at this point in the history
  • Loading branch information
llowinge authored and jamesnetherton committed Aug 5, 2022
1 parent 29a37eb commit cbc2288
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
20 changes: 20 additions & 0 deletions observability/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ You can also directly leverage MicroProfile Health APIs to create checks. Class

The tracing configuration for the application can be found within `application.properties`.

The default configuration uses the OTLP exporter, but it can be easily switched to the Jaeger exporter by applying this change in `application.properties`:

[source,shell]
----
- quarkus.opentelemetry.tracer.exporter.otlp.endpoint=http://localhost:4317
+ quarkus.opentelemetry.tracer.exporter.jaeger.endpoint=http://localhost:14250
----

and this change in `pom.xml`:

[source,xml]
----
<dependency>
<groupId>io.quarkus</groupId>
- <artifactId>quarkus-opentelemetry-exporter-otlp</artifactId>
+ <artifactId>quarkus-opentelemetry-exporter-jaeger</artifactId>
</dependency>
----


To view tracing events, start a tracing server. A simple way of doing this is with Docker Compose:

[source,shell]
Expand Down
5 changes: 2 additions & 3 deletions observability/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ services:
image: jaegertracing/all-in-one:1.33
ports:
- "16686:16686"
- "14268"
- "14250"
- "14268:14268"
- "14250:14250"

# Collector
otel-collector:
Expand All @@ -35,6 +35,5 @@ services:
ports:
- "13133:13133" # Health_check extension
- "4317:4317" # OTLP gRPC receiver
- "55680:55680" # OTLP gRPC receiver alternative port
depends_on:
- jaeger-all-in-one
4 changes: 3 additions & 1 deletion observability/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ quarkus.banner.enabled = false
# Identifier for the origin of spans created by the application
quarkus.application.name=camel-quarkus-observability

# gRPC endpoint for sending spans
# For OTLP
quarkus.opentelemetry.tracer.exporter.otlp.endpoint=http://localhost:4317
# For Jaeger
# quarkus.opentelemetry.tracer.exporter.jaeger.endpoint=http://localhost:14250

# Allow metrics to be exported as JSON. Not strictly required and is disabled by default
quarkus.micrometer.export.json.enabled = true
Expand Down

0 comments on commit cbc2288

Please sign in to comment.