-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(opentelemetry-instrumentation-aws-sdk): add missing spec-defined DynamoDB attributes #1524
feat(opentelemetry-instrumentation-aws-sdk): add missing spec-defined DynamoDB attributes #1524
Conversation
… DynamoDB attributes
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1524 +/- ##
==========================================
- Coverage 96.13% 95.38% -0.76%
==========================================
Files 14 16 +2
Lines 906 997 +91
Branches 197 206 +9
==========================================
+ Hits 871 951 +80
- Misses 35 46 +11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for adding this! this is very helpful :)
plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/dynamodb.ts
Outdated
Show resolved
Hide resolved
plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/dynamodb.ts
Outdated
Show resolved
Hide resolved
plugins/node/opentelemetry-instrumentation-aws-sdk/test/dynamodb.test.ts
Show resolved
Hide resolved
…ributes and additional unit tests
Which problem is this PR solving?
BatchGetItem
operation in feat(instrumentation-aws-sdk): upstream aws-sdk instrumentation from ext-js #678 and is completed by feat: Add capacity information when applicable to dynamodb spans #1365 which adds theConsumedCapacity
attribute for all applicable operations.Short description of the changes
AttributesToGet
request parameter (used in DynamoDB.query and DynamoDB.Scan), and by extension theAWS_DYNAMODB_ATTRIBUTES_TO_GET
attribute, are no longer necessary since the AttributesToGet parameter has been deprecated in favor of ProjectionExpression. Since the value of theProjectionExpression
parameter is already being captured for theAWS_DYNAMODB_PROJECTION
attribute in this PR, it is redundant to include a backwards-compatible check for the deprecated attribute.Testing
These changes were tested end-to-end using a simple application that makes a DynamoDB
ListItems
call and uses the aws-otel-collector to export data to AWS X-Ray. For ListItems operation, the newaws.dynamodb.table_count
,aws.dynamodb.exclusive_start_table
, andaws.dynamodb.exclusive_start_table
are now being populated correctly