opentracing-contrib / java-aws-sdk

OpenTracing instrumentation for AWS SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status Released Version Apache-2.0 license

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();

License

Apache 2.0 License.

About

OpenTracing instrumentation for AWS SDK

License:Apache License 2.0


Languages

Language:Java 84.2%Language:Shell 15.8%