Uh oh!
There was an error while loading. Please reload this page.
feat(server-utils): Port S3, Kinesis, DynamoDB, SecretsManager and StepFunctions aws-sdk extensions - #22164
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c3ac3ce to
0e20b44CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
|
078c598 to
979ee5cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
979ee5c to
e88a652CompareThere was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
There are 11 total unresolved issues (including 7 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e88a652. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 8 total unresolved issues (including 7 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e88a652. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
07afc91 to
36d9255Comparec61e735 to
7248300Compare7248300 to
50ce000Compare03eeceb to
fdd83ffComparefdd83ff to
735d2d1Compare735d2d1 to
36efbe1Compare48335ee to
1e0251fCompare48dafff to
f9f1f88Compare72ca505 to
f9f1f88Comparea1f3696 to
f9f1f88Comparef9f1f88 to
f7642b4Comparef7642b4 to
8a0ff74Compare8a0ff74 to
40bde8dCompare| if (normalizedRequest.commandInput?.ScanIndexForward) { | ||
| spanAttributes[ATTR_AWS_DYNAMODB_SCAN_FORWARD] = normalizedRequest.commandInput.ScanIndexForward; | ||
| } |
There was a problem hiding this comment.
Bug: The check for ScanIndexForward uses a truthy conditional, which incorrectly omits the span attribute when the value is explicitly false, a meaningful state for DynamoDB queries.
Severity: MEDIUM
Suggested Fix
Modify the conditional to explicitly handle both true and false values. Instead of a simple truthy check, verify the property is not undefined, for example: if (normalizedRequest.commandInput?.ScanIndexForward !== undefined). This will ensure the attribute is set correctly for both true and false values.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/dynamodb.ts#L108-L110
Potential issue: The code checks for the `ScanIndexForward` parameter using `if
(normalizedRequest.commandInput?.ScanIndexForward)`. This conditional only evaluates to
true for truthy values, causing it to fail when `ScanIndexForward` is explicitly set to
`false`. Since `false` is a valid and meaningful value indicating a reverse-order scan,
the `aws.dynamodb.scan_forward` span attribute is incorrectly omitted in this scenario.
This leads to a loss of observability for DynamoDB queries that request results in
descending order. A similar issue exists for the `ConsistentRead` parameter.
40bde8d to
508031cCompare…epFunctions aws-sdk extensions
…om @sentry/conventions
508031c to
d7d156aCompare| if (normalizedRequest.commandInput?.Segment) { | ||
| spanAttributes[ATTR_AWS_DYNAMODB_SEGMENT] = normalizedRequest.commandInput?.Segment; | ||
| } |
There was a problem hiding this comment.
Bug: The truthy check on commandInput.Segment fails when its value is 0, causing the span attribute for the first segment of a DynamoDB parallel scan to be dropped.
Severity: LOW
Suggested Fix
Modify the conditional check to correctly handle the case where Segment is 0. Instead of a truthy check, explicitly test if the value is not undefined or is a number, for example: if (normalizedRequest.commandInput?.Segment !== undefined).
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/dynamodb.ts#L122-L124
Potential issue: In DynamoDB parallel scans, the `Segment` attribute is a zero-based
integer. The code checks for its existence with a simple truthy check: `if
(normalizedRequest.commandInput?.Segment)`. Because the number `0` is falsy in
JavaScript, this condition evaluates to false when `Segment` is `0`. As a result, the
`ATTR_AWS_DYNAMODB_SEGMENT` attribute is never added to the span for the first segment
of any parallel scan, leading to incomplete telemetry data for this operation.

Ports the attribute-only service extensions from the OTel aws-sdk integration to the orchestrion channel integration and registers them in the service registry:
aws.s3.bucketaws.kinesis.stream.namedb.*andaws.dynamodb.*request/response attributesaws.secretsmanager.secret.arn(request and response)Straight ports; none of these inject trace propagation or change span lifecycle.
Part of #20946