JVM since2.1.0 Native since2.1.0

Distributed tracing using OpenTelemetry

What’s inside

Please refer to the above link for usage and configuration details.

Maven coordinates

Or add the coordinates to your existing project:


Check the User guide for more information about writing Camel Quarkus applications.


The extension automatically creates a Camel OpenTelemetryTracer and binds it to the Camel registry.

In order to send the captured traces to a tracing system, you need to configure some properties within like those below.

# Identifier for the origin of spans created by the application

# OTLP exporter endpoint

Refer to the Quarkus OpenTelemetry guide for a full list of configuration options.

Route endpoints can be excluded from tracing by configuring a property named quarkus.camel.opentelemetry.exclude-patterns in For example:

# Exclude all direct & netty-http endpoints from tracing


Quarkus OpenTelemetry defaults to the standard OTLP exporter defined in OpenTelemetry. Additional exporters will be available in the Quarkiverse quarkus-opentelemetry-exporter project.

Tracing CDI bean method execution

When instrumenting the execution of CDI bean methods from Camel routes, you should annotate such methods with io.opentelemetry.extension.annotations.WithSpan. Methods annotated with @WithSpan will create a new Span and establish any required relationships with the current Trace context.

For example, to instrument a CDI bean from a Camel route, first ensure the appropriate methods are annotated with @WithTrace.

public class MyBean {
    public String greet() {
        return "Hello World!";

Next, use the bean in your Camel route.

To ensure that the sequence of recorded spans is correct, you must use the full to("bean:") endpoint URI and not the shortened .bean() EIP DSL method.
public class MyRoutes extends RouteBuilder {
    public void configure() throws Exception {

There is more information about CDI instrumentation in the Quarkus OpenTelemetry guide.

Additional Camel Quarkus configuration

Configuration property Type Default


Sets whether header names need to be encoded. Can be useful in situations where OpenTelemetry propagators potentially set header name values in formats that are not compatible with the target system. E.g for JMS where the specification mandates header names are valid Java identifiers.




Sets whether to disable tracing for endpoint URIs that match the given patterns. The pattern can take the following forms:

1. An exact match on the endpoint URI. E.g platform-http:/some/path

2. A wildcard match. E.g platform-http:*

3. A regular expression matching the endpoint URI. E.g platform-http:/prefix/.*


Configuration property fixed at build time. All other configuration properties are overridable at runtime.