This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/aws-sdk-2.2.md.

AWS SDK

OpenTelemetry Java agent instrumentation

This instrumentation covers the AWS SDK 2.2+ client library, enabling messaging and client spans and metrics for calls to AWS services including DynamoDB, EC2, Kinesis, Lambda, RDS, S3, SNS/SQS and Bedrock.

  • Name: aws-sdk-2.2
  • Scope: io.opentelemetry.aws-sdk-2.2
  • Target versions: software.amazon.awssdk:aws-core:[2.2.0,), software.amazon.awssdk:bedrockruntime:[2.25.63,), software.amazon.awssdk:lambda:[2.17.0,), software.amazon.awssdk:sns:[2.2.0,), software.amazon.awssdk:sqs:[2.2.0,)
  • Library: https://aws.amazon.com/sdk-for-java/

Telemetry

  • Metrics: gen_ai.client.operation.duration, gen_ai.client.token.usage, db.client.operation.duration
  • Span attributes: aws.agent, aws.dynamodb.consumed_capacity, aws.dynamodb.count, aws.dynamodb.global_secondary_indexes, aws.dynamodb.item_collection_metrics, aws.dynamodb.limit, aws.dynamodb.provisioned_read_capacity, aws.dynamodb.provisioned_write_capacity, aws.dynamodb.scanned_count, aws.dynamodb.select, aws.dynamodb.table_count, aws.dynamodb.table_names, aws.kinesis.stream_name, aws.lambda.function.arn, aws.lambda.function.name, aws.lambda.resource_mapping.id, aws.queue.name, aws.request_id, aws.s3.bucket, aws.secretsmanager.secret.arn, aws.sns.topic.arn, aws.sqs.queue.url, aws.step_functions.activity.arn, aws.step_functions.state_machine.arn, db.operation, db.system, gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.max_tokens, gen_ai.request.model, gen_ai.request.stop_sequences, gen_ai.request.temperature, gen_ai.request.top_p, gen_ai.response.finish_reasons, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens, http.request.method, http.response.status_code, messaging.destination.name, rpc.method, rpc.service, rpc.system, server.address, server.port, url.full, messaging.batch.message_count, messaging.message.id, messaging.operation, messaging.system, db.collection.name, db.operation.batch.size, db.operation.name, db.system.name

Configuration

OptionTypeDefaultDescription
otel.instrumentation.messaging.experimental.capture-headerslistA comma-separated list of header names to capture as span attributes.
otel.instrumentation.aws-sdk.experimental-record-individual-http-errorbooleanfalseDetermines whether errors returned by each individual HTTP request should be recorded as events for the SDK span.
otel.instrumentation.aws-sdk.experimental-span-attributesbooleanfalseEnables experimental span attributes aws.agent, aws.lambda.function.arn and aws.lambda.function.name for AWS SDK instrumentation.
otel.instrumentation.aws-sdk.experimental-use-propagator-for-messagingbooleanfalseDetermines whether the configured TextMapPropagator should be used to inject into supported messaging attributes (for SQS).
otel.instrumentation.genai.capture-message-contentbooleanfalseDetermines whether Generative AI events include full content of user and assistant messages. Note that full content can have data privacy and size concerns and care should be taken when enabling this
otel.instrumentation.messaging.experimental.receive-telemetry.enabledbooleanfalseEnables experimental receive telemetry, which will cause consumers to start a new trace, with only a span link connecting it to the producer trace.

Data

  • JSON: /data/javaagent/instrumentations/aws-sdk-2.2/aws-sdk-2.2-5f43cba8f5f8.json
  • Explore: /java-agent/instrumentation/aws-sdk-2.2