Class AwsSdkTelemetry
java.lang.Object
io.opentelemetry.instrumentation.awssdk.v2_2.AwsSdkTelemetry
Entrypoint to OpenTelemetry instrumentation of the AWS SDK. Register the
ExecutionInterceptor returned by newExecutionInterceptor() with an SDK client to have
all requests traced.
DynamoDbClient dynamoDb = DynamoDbClient.builder()
.overrideConfiguration(ClientOverrideConfiguration.builder()
.addExecutionInterceptor(AwsSdkTelemetry.create(openTelemetry).newExecutionInterceptor())
.build())
.build();
-
Method Summary
Modifier and TypeMethodDescriptionstatic AwsSdkTelemetryBuilderbuilder(io.opentelemetry.api.OpenTelemetry openTelemetry) Returns a newAwsSdkTelemetryBuilderconfigured with the givenOpenTelemetry.static AwsSdkTelemetrycreate(io.opentelemetry.api.OpenTelemetry openTelemetry) Returns a newAwsSdkTelemetryconfigured with the givenOpenTelemetry.software.amazon.awssdk.core.interceptor.ExecutionInterceptorReturns a newExecutionInterceptorthat can be used with methods likeClientOverrideConfiguration.Builder.addExecutionInterceptor(ExecutionInterceptor).software.amazon.awssdk.services.sqs.SqsAsyncClientwrap(software.amazon.awssdk.services.sqs.SqsAsyncClient sqsClient) Construct a new tracing-enableSqsAsyncClientusing the providedSqsAsyncClientinstance.software.amazon.awssdk.services.sqs.SqsClientwrap(software.amazon.awssdk.services.sqs.SqsClient sqsClient) Construct a new tracing-enableSqsClientusing the providedSqsClientinstance.
-
Method Details
-
create
Returns a newAwsSdkTelemetryconfigured with the givenOpenTelemetry. -
builder
Returns a newAwsSdkTelemetryBuilderconfigured with the givenOpenTelemetry. -
newExecutionInterceptor
public software.amazon.awssdk.core.interceptor.ExecutionInterceptor newExecutionInterceptor()Returns a newExecutionInterceptorthat can be used with methods likeClientOverrideConfiguration.Builder.addExecutionInterceptor(ExecutionInterceptor). -
wrap
public software.amazon.awssdk.services.sqs.SqsClient wrap(software.amazon.awssdk.services.sqs.SqsClient sqsClient) Construct a new tracing-enableSqsClientusing the providedSqsClientinstance. -
wrap
public software.amazon.awssdk.services.sqs.SqsAsyncClient wrap(software.amazon.awssdk.services.sqs.SqsAsyncClient sqsClient) Construct a new tracing-enableSqsAsyncClientusing the providedSqsAsyncClientinstance.
-