opentelemetry-java-instrume.../instrumentation/aws-sdk/aws-sdk-2.2/library
Mateusz Rzeszutek 82b39b1012
Rename `newInstrumenter()` into `buildInstrumenter()` (#6363)
* Rename newInstrumenter() into buildInstrumenter()

* spotless
2022-07-25 12:02:46 -07:00
..
src Rename `newInstrumenter()` into `buildInstrumenter()` (#6363) 2022-07-25 12:02:46 -07:00
README.md Automatic AWS library instrumentor (#4607) 2021-11-22 11:15:44 -08:00
build.gradle.kts Migrate Guava tests to Java (#5668) 2022-03-24 14:14:09 +09:00

README.md

AWS Java SDK v2 Instrumentation

Instrumentation for AWS Java SDK v2.

Usage

To instrument all AWS SDK clients include the opentelemetry-aws-sdk-2.2-autoconfigure submodule in your classpath.

To register instrumentation only on a specific SDK client, register the interceptor when creating it.

DynamoDbClient client = DynamoDbClient.builder()
  .overrideConfiguration(ClientOverrideConfiguration.builder()
    .addExecutionInterceptor(AwsSdk.newInterceptor()))
    .build())
  .build();

Trace propagation

The AWS SDK instrumentation currently only supports injecting the trace header into the request using the AWS Trace Header format. This format is the only format recognized by AWS managed services, and populating will allow propagating the trace through them. If this does not fulfill your use case, perhaps because you are using the same SDK with a different non-AWS managed service, let us know so we can provide configuration for this behavior.