AWS SDK
OpenTelemetry Java agent instrumentation
This instrumentation covers the AWS SDK 1.11+ client library, enabling messaging and client spans and metrics for calls to AWS services including DynamoDB, EC2, Kinesis, Lambda, RDS, S3, secrets manager, SNS/SQS and step functions.
- Name:
aws-sdk-1.11 - Scope:
io.opentelemetry.aws-sdk-1.11 - Target versions:
com.amazonaws:aws-java-sdk-core:[1.10.33,),com.amazonaws:aws-java-sdk-sqs:[1.10.33,) - Library: https://aws.amazon.com/sdk-for-java/
Telemetry
When default
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | aws.agent (STRING), aws.dynamodb.table_names (STRING_ARRAY), aws.kinesis.stream_name (STRING), aws.lambda.function.arn (STRING), aws.lambda.function.name (STRING), aws.lambda.resource_mapping.id (STRING), aws.queue.name (STRING), aws.request_id (STRING), aws.s3.bucket (STRING), aws.sns.topic.arn (STRING), aws.sqs.queue.url (STRING), aws.step_functions.activity.arn (STRING), aws.step_functions.state_machine.arn (STRING), db.operation (STRING), db.system (STRING), error.type (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.destination.name (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
| CONSUMER | aws.agent (STRING), aws.request_id (STRING), aws.sqs.queue.url (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.batch.message_count (LONG), messaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation (STRING), messaging.system (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
| PRODUCER | aws.agent (STRING), aws.request_id (STRING), aws.sqs.queue.url (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation (STRING), messaging.system (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
When otel.semconv-stability.opt-in=database
Metrics
| Metric | Instrument | Type | Unit | Description |
|---|---|---|---|---|
db.client.operation.duration | histogram | HISTOGRAM | s | Duration of database client operations. |
| Metric | Attributes |
|---|---|
db.client.operation.duration | db.collection.name (STRING), db.operation.name (STRING), db.system.name (STRING), server.address (STRING), server.port (LONG) |
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | aws.agent (STRING), aws.dynamodb.table_names (STRING_ARRAY), aws.kinesis.stream_name (STRING), aws.lambda.function.arn (STRING), aws.lambda.function.name (STRING), aws.lambda.resource_mapping.id (STRING), aws.queue.name (STRING), aws.request_id (STRING), aws.s3.bucket (STRING), aws.sns.topic.arn (STRING), aws.sqs.queue.url (STRING), aws.step_functions.activity.arn (STRING), aws.step_functions.state_machine.arn (STRING), db.collection.name (STRING), db.operation.batch.size (LONG), db.operation.name (STRING), db.system.name (STRING), error.type (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.destination.name (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
| CONSUMER | aws.agent (STRING), aws.request_id (STRING), aws.sqs.queue.url (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation (STRING), messaging.system (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
When otel.semconv-stability.preview=messaging
Metrics
| Metric | Instrument | Type | Unit | Description |
|---|---|---|---|---|
messaging.client.consumed.messages | counter | LONG_SUM | {message} | Number of messages that were delivered to the application. |
messaging.client.operation.duration | histogram | HISTOGRAM | s | Duration of messaging operation initiated by a producer or consumer client. |
messaging.client.sent.messages | counter | LONG_SUM | {message} | Number of messages producer attempted to send to the broker. |
messaging.process.duration | histogram | HISTOGRAM | s | Duration of processing operation. |
| Metric | Attributes |
|---|---|
messaging.client.consumed.messages | messaging.destination.name (STRING), messaging.operation.name (STRING), messaging.system (STRING), server.address (STRING), server.port (LONG) |
messaging.client.operation.duration | messaging.destination.name (STRING), messaging.operation.name (STRING), messaging.operation.type (STRING), messaging.system (STRING), server.address (STRING), server.port (LONG) |
messaging.client.sent.messages | messaging.destination.name (STRING), messaging.operation.name (STRING), messaging.system (STRING), server.address (STRING), server.port (LONG) |
messaging.process.duration | messaging.destination.name (STRING), messaging.operation.name (STRING), messaging.system (STRING), server.address (STRING), server.port (LONG) |
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | aws.agent (STRING), aws.queue.name (STRING), aws.request_id (STRING), aws.sqs.queue.url (STRING), error.type (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.batch.message_count (LONG), messaging.destination.name (STRING), messaging.operation.name (STRING), messaging.operation.type (STRING), messaging.system (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
| CONSUMER | aws.agent (STRING), aws.request_id (STRING), aws.sqs.queue.url (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation.name (STRING), messaging.operation.type (STRING), messaging.system (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
| PRODUCER | aws.agent (STRING), aws.request_id (STRING), aws.sqs.queue.url (STRING), http.request.method (STRING), http.response.status_code (LONG), messaging.batch.message_count (LONG), messaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation.name (STRING), messaging.operation.type (STRING), messaging.system (STRING), network.protocol.version (STRING), rpc.method (STRING), rpc.service (STRING), rpc.system (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
otel.instrumentation.common.messaging.message-create-spans.enabled | boolean | true | Provides the default for whether to create a producer span for each eligible message in a batch send when stable messaging semantic conventions are enabled. An instrumentation-specific setting takes precedence. |
otel.instrumentation.messaging.experimental.capture-headers | list | Deprecated: use otel.instrumentation.common.messaging.headers.included instead. Ignored without a warning under v3-preview; may be removed in a later minor release and will be removed no later than 3.0. A comma-separated list of header names to capture as span attributes. It does not support glob patterns: an entry containing * or ? is ignored with a warning, and every other entry is matched as a literal header name. | |
otel.instrumentation.messaging.experimental.headers.excluded | list | Deprecated: use otel.instrumentation.common.messaging.headers.excluded instead. Ignored without a warning under v3-preview; may be removed in a later minor release and will be removed no later than 3.0. | |
otel.instrumentation.messaging.experimental.headers.included | list | Deprecated: use otel.instrumentation.common.messaging.headers.included instead. Ignored without a warning under v3-preview; may be removed in a later minor release and will be removed no later than 3.0. | |
otel.instrumentation.messaging.experimental.receive-telemetry.enabled | boolean | false | Deprecated: use otel.instrumentation.common.messaging.experimental.receive-telemetry.enabled instead. It may be removed in the next minor release. |
otel.instrumentation.common.messaging.headers.excluded | list | A comma-separated list of case-sensitive message header name glob patterns to exclude from span attributes. ? matches one character and * matches zero or more characters. Excluded patterns take precedence over included patterns. An absent or empty selector captures no headers; an exclude-only selector captures every header not excluded, which may expose sensitive information. | |
otel.instrumentation.common.messaging.headers.included | list | A comma-separated list of case-sensitive message header name glob patterns to capture as span attributes. ? matches one character and * matches zero or more characters. Excluded patterns take precedence over included patterns. An absent or empty selector captures no headers; an exclude-only selector captures every header not excluded. | |
otel.instrumentation.aws-sdk.experimental-span-attributes | boolean | false | Enables the experimental span attributes aws.agent, aws.queue.name, aws.lambda.function.arn and aws.lambda.function.name for AWS SDK instrumentation. |
otel.instrumentation.aws-sdk.message-create-spans.enabled | boolean | Determines whether to create a producer span for each eligible message in an SQS batch send when stable messaging semantic conventions are enabled. Overrides otel.instrumentation.common.messaging.message-create-spans.enabled for this instrumentation; when unset, that setting applies. | |
otel.instrumentation.common.messaging.experimental.receive-telemetry.enabled | boolean | false | Enables experimental receive telemetry, which will cause consumers to start a new trace, with only a span link connecting it to the producer trace. |