OpenTracing AWS Client Instrumentation
OpenTracing instrumentation for AWS clients.
Installation
AWS SDK 1
pom.xml
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-aws-sdk-1</artifactId>
<version>VERSION</version>
</dependency>
AWS SDK 2
pom.xml
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-aws-sdk-2</artifactId>
<version>VERSION</version>
</dependency>
Usage
// Instantiate tracer
Tracer tracer = ...
AWS SDK 1
// Build AWS client with TracingRequestHandler e.g.
AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
.withRegion(Regions.US_WEST_2)
.withRequestHandlers(new TracingRequestHandler(tracer))
.build();
AWS SDK 2
// Build AWS client with TracingExecutionInterceptor e.g.
S3Client s3Client = S3Client.builder().overrideConfiguration(
builder -> builder.addExecutionInterceptor(new TracingExecutionInterceptor(tracer)))
.build();