Class AwsSdkTracing


  • public class AwsSdkTracing
    extends Object
    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(AwsSdkTracing.create(openTelemetry).newExecutionInterceptor())
             .build())
         .build();
     
    • Method Detail

      • create

        public static AwsSdkTracing create​(io.opentelemetry.api.OpenTelemetry openTelemetry)
        Returns a new AwsSdkTracing configured with the given OpenTelemetry.
      • newExecutionInterceptor

        public software.amazon.awssdk.core.interceptor.ExecutionInterceptor newExecutionInterceptor()
        Returns a new ExecutionInterceptor that can be used with methods like ClientOverrideConfiguration.Builder.addExecutionInterceptor(ExecutionInterceptor).