By default, the exporters will send out data in batches, using the gRPC protocol and endpoint http://localhost:4317.
If you need to change any of the default property values, here is an example on how to configure the default OTLP gRPC Exporter within the application, using the src/main/resources/application.properties file:
quarkus.application.name=myservice // (1)
quarkus.otel.exporter.otlp.endpoint=http://localhost:4317 // (2)
quarkus.otel.exporter.otlp.headers=authorization=Bearer my_secret // (3)
quarkus.log.console.format=%d{HH:mm:ss} %-5p traceId=%X{traceId}, parentId=%X{parentId}, spanId=%X{spanId}, sampled=%X{sampled} [%c{2.}] (%t) %s%e%n // (4)
# Alternative to the console log
quarkus.http.access-log.pattern="...traceId=%{X,traceId} spanId=%{X,spanId}" // (5)
-
All telemetry created from the application will include an OpenTelemetry
Resourceattribute indicating the telemetry was created by themyserviceapplication. If not set, it will default to the artifact id. -
gRPC endpoint to send the telemetry. If not set, it will default to
http://localhost:4317. -
Optional gRPC headers commonly used for authentication
-
Add tracing information into log messages.
-
You can also only put the trace info into the access log. In this case you must omit the info in the console log format.
We provide signal agnostic configurations for the connection related properties, meaning that you can use the same properties for both tracing and metrics when you set:
quarkus.otel.exporter.otlp.endpoint=http://localhost:4317
If you need different configurations for each signal, you can use the specific properties:
quarkus.otel.exporter.otlp.traces.endpoint=http://trace-uri:4317 // (1)
quarkus.otel.exporter.otlp.metrics.endpoint=http://metrics-uri:4317 // (2)
quarkus.otel.exporter.otlp.logs.endpoint=http://logs-uri:4317 // (3)
-
The endpoint for the traces exporter.
-
The endpoint for the metrics exporter.
-
The endpoint for the logs exporter.
If you need that your spans and logs to be exported directly as they finish
(e.g. in a serverless environment / application), you can set this property to true.
This replaces the default batching of data.
quarkus.otel.simple=true