Class AwsSdkTelemetry
java.lang.Object
io.opentelemetry.instrumentation.awssdk.v1_11.AwsSdkTelemetry
Entrypoint for instrumenting AWS SDK v1 clients.
AWS SDK v1 is quite old and has some known bugs that are not fixed due to possible backwards
compatibility issues. Notably, if a RequestHandler2 throws an exception in a callback,
this exception will leak up the chain and prevent other handlers from being executed. You must
ensure you do not register any problematic RequestHandler2s on your clients or you will
witness broken traces.
-
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.static io.opentelemetry.context.ContextgetOpenTelemetryContext(com.amazonaws.Request<?> request) Returns the OpenTelemetryContextstored in theRequest, ornullif there is noContext.com.amazonaws.handlers.RequestHandler2Returns aRequestHandler2for registration to AWS SDK client builders usingwithRequestHandlers.
-
Method Details
-
getOpenTelemetryContext
public static io.opentelemetry.context.Context getOpenTelemetryContext(com.amazonaws.Request<?> request) Returns the OpenTelemetryContextstored in theRequest, ornullif there is noContext. This is generally not needed unless you are implementing your own instrumentation that delegates to this one. -
create
Returns a newAwsSdkTelemetryconfigured with the givenOpenTelemetry. -
builder
Returns a newAwsSdkTelemetryBuilderconfigured with the givenOpenTelemetry. -
newRequestHandler
public com.amazonaws.handlers.RequestHandler2 newRequestHandler()Returns aRequestHandler2for registration to AWS SDK client builders usingwithRequestHandlers.
-