OpenTelemetry for Amazon Services
Quarkus Amazon Services facilitates integration of the AWS SDK instrumentation.
Adding the quarkus-opentelemetry
extension will automatically inject an interceptor with default AwsSdkTelemetry configuration in all produced extension clients that have opted into instrumentation. This is achieved by setting the configuration property quarkus.<extension>.telemetry.enabled
to true. This setting is set to false
by default.
Quarkus Amazon Services supports the OpenTelemetry Autoconfiguration for Traces. The configurations match what you can see at OpenTelemetry SDK Autoconfigure with the quarkus.*
prefix.
If necessary, you can provide your own AwsSdkTelemetry instance used to instrument all clients.
package org.acme;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.instrumentation.awssdk.v2_2.AwsSdkTelemetry;
import io.quarkus.arc.Unremovable;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Singleton;
@ApplicationScoped
public class MyProducer {
@Produces
@Singleton
@Unremovable
public AwsSdkTelemetry myTelemetry() {
return AwsSdkTelemetry.builder(OpenTelemetry.noop()).build();
}
}
Configuration Reference
Configuration property fixed at build time - All other configuration properties are overridable at runtime
Configuration property |
Type |
Default |
---|---|---|
list of string |
||
Set whether to capture the consumer message receive telemetry in messaging instrumentation. Note that this will cause the consumer side to start a new trace, with only a span link connecting it to the producer trace. Environment variable: |
boolean |
|
Sets whether experimental attributes should be set to spans. These attributes may be changed or removed in the future, so only enable this if you know you do not require attributes filled by this instrumentation to be stable across versions. Environment variable: |
boolean |
|
Sets whether the io.opentelemetry.context.propagation.TextMapPropagator configured in the provided OpenTelemetry should be used to inject into supported messaging attributes (currently only SQS; SNS may follow). In addition, the X-Ray propagator is always used. Using the messaging propagator is needed if your tracing vendor requires special tracestate entries or legacy propagation information that cannot be transported via X-Ray headers. It may also be useful if you need to directly connect spans over messaging in your tracing backend, bypassing any intermediate spans/X-Ray segments that AWS may create in the delivery process. This option is off by default. If enabled, on extraction the configured propagator will be preferred over X-Ray if it can extract anything. Environment variable: |
boolean |
|
Sets whether errors returned by each individual HTTP request should be recorded as events for the SDK span. This option is off by default. If enabled, the HTTP error code and the error message will be captured and associated with the span. This provides detailed insights into errors on a per-request basis. Environment variable: |
boolean |
|