Class AwsSdkTelemetry

java.lang.Object
io.opentelemetry.instrumentation.awssdk.v2_2.AwsSdkTelemetry

public class AwsSdkTelemetry 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(AwsSdkTelemetry.create(openTelemetry).newExecutionInterceptor())
         .build())
     .build();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(io.opentelemetry.api.OpenTelemetry openTelemetry)
    Returns a new AwsSdkTelemetryBuilder configured with the given OpenTelemetry.
    create(io.opentelemetry.api.OpenTelemetry openTelemetry)
    Returns a new AwsSdkTelemetry configured with the given OpenTelemetry.
    software.amazon.awssdk.core.interceptor.ExecutionInterceptor
    Returns a new ExecutionInterceptor that can be used with methods like ClientOverrideConfiguration.Builder.addExecutionInterceptor(ExecutionInterceptor).
    software.amazon.awssdk.services.sqs.SqsAsyncClient
    wrap(software.amazon.awssdk.services.sqs.SqsAsyncClient sqsClient)
    Construct a new tracing-enable SqsAsyncClient using the provided SqsAsyncClient instance.
    software.amazon.awssdk.services.sqs.SqsClient
    wrap(software.amazon.awssdk.services.sqs.SqsClient sqsClient)
    Construct a new tracing-enable SqsClient using the provided SqsClient instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static AwsSdkTelemetry create(io.opentelemetry.api.OpenTelemetry openTelemetry)
      Returns a new AwsSdkTelemetry configured with the given OpenTelemetry.
    • builder

      public static AwsSdkTelemetryBuilder builder(io.opentelemetry.api.OpenTelemetry openTelemetry)
      Returns a new AwsSdkTelemetryBuilder 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).
    • wrap

      public software.amazon.awssdk.services.sqs.SqsClient wrap(software.amazon.awssdk.services.sqs.SqsClient sqsClient)
      Construct a new tracing-enable SqsClient using the provided SqsClient instance.
    • wrap

      public software.amazon.awssdk.services.sqs.SqsAsyncClient wrap(software.amazon.awssdk.services.sqs.SqsAsyncClient sqsClient)
      Construct a new tracing-enable SqsAsyncClient using the provided SqsAsyncClient instance.