Class AwsSdkTelemetryBuilder
java.lang.Object
io.opentelemetry.instrumentation.awssdk.v2_2.AwsSdkTelemetryBuilder
A builder of
AwsSdkTelemetry.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newAwsSdkTelemetrywith the settings of thisAwsSdkTelemetryBuilder.setCaptureExperimentalSpanAttributes(boolean captureExperimentalSpanAttributes) Sets whether experimental attributes should be set to spans.setUseConfiguredPropagatorForMessaging(boolean useMessagingPropagator) Sets whether theTextMapPropagatorconfigured in the providedOpenTelemetryshould be used to inject into supported messaging attributes (currently only SQS; SNS may follow).
-
Method Details
-
setCaptureExperimentalSpanAttributes
@CanIgnoreReturnValue public AwsSdkTelemetryBuilder setCaptureExperimentalSpanAttributes(boolean captureExperimentalSpanAttributes) 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 -
setUseConfiguredPropagatorForMessaging
@CanIgnoreReturnValue public AwsSdkTelemetryBuilder setUseConfiguredPropagatorForMessaging(boolean useMessagingPropagator) Sets whether theTextMapPropagatorconfigured in the providedOpenTelemetryshould 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.
-
build
Returns a newAwsSdkTelemetrywith the settings of thisAwsSdkTelemetryBuilder.
-