Fix DynamoDB stable database semconv#18970
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns AWS DynamoDB instrumentation with the stable database semantic conventions by normalizing batch operation names and ensuring db.collection.name is emitted for single-table batch requests, with added stable-semconv test coverage to prevent regressions.
Changes:
- Emit stable DynamoDB batch operation names as
BATCH GetItem/BATCH WriteItem(AWS SDK v1 & v2). - Populate
db.collection.namefor AWS SDK v1 single-table DynamoDB batch requests (viaRequestItemswhen needed). - Add/extend stable semconv test execution in AWS SDK v1 autoconfigure and AWS SDK v2 core-only test coverage.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientCoreTest.java | Updates DynamoDB assertions to expect stable batch operation naming under stable semconv opt-in. |
| instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/DynamoDbAttributesExtractor.java | Maps DynamoDB batch operation names to stable forms and refines single-table db.collection.name extraction for batch requests. |
| instrumentation/aws-sdk/aws-sdk-2.2/library/build.gradle.kts | Adds a stable-semconv test task for the testCoreOnly source set and wires it into check. |
| instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractDynamoDbClientTest.java | Adds stable semconv coverage for v1 BatchGetItem (single-table) and factors client creation into a helper. |
| instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/internal/RequestAccess.java | Adds reflective access to getRequestItems() to support table-name extraction for batch operations. |
| instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/internal/DynamoDbAttributesExtractor.java | Emits stable batch operation naming and sets db.collection.name for single-table batch requests. |
| instrumentation/aws-sdk/aws-sdk-1.11/library-autoconfigure/build.gradle.kts | Adds a stable-semconv test task (with database opt-in) and wires it into check. |
trask
force-pushed
the
dynamodb-batch-statement
branch
from
June 12, 2026 03:32
cdbe83e to
67549d8
Compare
laurit
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BATCH GetItemandBATCH WriteItemdb.collection.namefor AWS SDK v1 single-table DynamoDB batch requestscc @chlos