OpenTelemetry
Stable • Since 2.7.0
Generate OpenTelemetry traces.
OpenTelemetry Metrics and Logging are not supported yet on neither Quarkus nor CXF side, hence Quarkus CXF cannot support them either. Tracing is thus the only OpenTelemetry feature supported by this extension. |
Maven coordinates
Create a new project using quarkus-cxf-integration-tracing-opentelemetry
on code.quarkus.io
or add these coordinates to your existing project:
<dependency>
<groupId>io.quarkiverse.cxf</groupId>
<artifactId>quarkus-cxf-integration-tracing-opentelemetry</artifactId>
</dependency>
Check the User guide and especially its Dependency management section for more information about writing applications with Quarkus CXF. |
Usage
This extension builds on top of org.apache.cxf.tracing.opentelemetry.OpenTelemetryFeature
(for service endpoints)
and org.apache.cxf.tracing.opentelemetry.OpenTelemetryClientFeature
(for clients).
Instances of these are created and configured internally using the instance of io.opentelemetry.api.OpenTelemetry
provided by Quarkus OpenTelemetry.
The tracing is enabled by default for all clients and service endpoints created by Quarkus CXF,
unless you disable it explicitly via quarkus.cxf.otel.enabled-for
, quarkus.cxf.client."client-name".otel.enabled
or quarkus.cxf.endpoint."/endpoint-path".otel.enabled
.
Runnable example
There is an integration test
covering OpenTelemetry in the Quarkus CXF source tree.
It is using InMemorySpanExporter
from io.opentelemetry:opentelemetry-sdk-testing
,
so that the spans can be inspected from tests easily.
Refer to Quarkus OpenTelemetry guide for information
about other supported span exporters and collectors.
Configuration
Configuration property fixed at build time. All other configuration properties are overridable at runtime.
Configuration property | Type | Default |
---|---|---|
|
|
|
Specifies whether the OpenTelemetry tracing will be enabled for clients, services, both or none. This global setting
can be overridden per client or service endpoint using the Environment variable: |
||
|
|
|
If Environment variable: |
||
|
|
|
If Environment variable: |