Skip to content

feat(server-utils): Port S3, Kinesis, DynamoDB, SecretsManager and StepFunctions aws-sdk extensions#22164

Merged
andreiborza merged 2 commits into
ab/aws-sdk-server-utilsfrom
ab/aws-sdk-services
Jul 16, 2026
Merged

feat(server-utils): Port S3, Kinesis, DynamoDB, SecretsManager and StepFunctions aws-sdk extensions#22164
andreiborza merged 2 commits into
ab/aws-sdk-server-utilsfrom
ab/aws-sdk-services

Conversation

@andreiborza

@andreiborza andreiborza commented Jul 9, 2026

Copy link
Copy Markdown
Member

Ports the attribute-only service extensions from the OTel aws-sdk integration to the orchestrion channel integration and registers them in the service registry:

  • S3: aws.s3.bucket
  • Kinesis: aws.kinesis.stream.name
  • DynamoDB: db.* and aws.dynamodb.* request/response attributes
  • SecretsManager: aws.secretsmanager.secret.arn (request and response)
  • StepFunctions: state machine / activity ARNs

Straight ports; none of these inject trace propagation or change span lifecycle.

Part of #20946

@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 3 times, most recently from c3ac3ce to 0e20b44 Compare July 9, 2026 21:48
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.74 kB - -
@sentry/browser - with treeshaking flags 26.19 kB - -
@sentry/browser (incl. Tracing) 46.57 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.36 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.34 kB - -
@sentry/browser (incl. Tracing, Replay) 85.83 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.46 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.55 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.18 kB - -
@sentry/browser (incl. Feedback) 44.92 kB - -
@sentry/browser (incl. sendFeedback) 32.54 kB - -
@sentry/browser (incl. FeedbackAsync) 37.67 kB - -
@sentry/browser (incl. Metrics) 28.84 kB - -
@sentry/browser (incl. Logs) 29.07 kB - -
@sentry/browser (incl. Metrics & Logs) 29.76 kB - -
@sentry/react 29.54 kB - -
@sentry/react (incl. Tracing) 48.82 kB - -
@sentry/vue 33.17 kB - -
@sentry/vue (incl. Tracing) 48.55 kB - -
@sentry/svelte 27.77 kB - -
CDN Bundle 30.14 kB - -
CDN Bundle (incl. Tracing) 48.52 kB - -
CDN Bundle (incl. Logs, Metrics) 31.72 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.83 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.97 kB - -
CDN Bundle (incl. Tracing, Replay) 86.04 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.82 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.09 kB - -
CDN Bundle - uncompressed 89.85 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.66 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.56 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.64 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.28 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.86 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.82 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.56 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.52 kB - -
@sentry/nextjs (client) 51.38 kB - -
@sentry/sveltekit (client) 47 kB - -
@sentry/core/server 78.71 kB - -
@sentry/core/browser 65.08 kB - -
@sentry/node-core 63.21 kB +0.01% +1 B 🔺
@sentry/node 125.45 kB - -
@sentry/node (incl. diagnostics channel injection) 144.61 kB +1.41% +2 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB -0.01% -2 B 🔽
@sentry/node/light 51.33 kB -0.01% -1 B 🔽
@sentry/node - without tracing 74.7 kB +0.01% +2 B 🔺
@sentry/aws-serverless 83.92 kB - -
@sentry/cloudflare (withSentry) - minified 182.1 kB - -
@sentry/cloudflare (withSentry) 450.9 kB - -

View base workflow run

@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 3 times, most recently from 078c598 to 979ee5c Compare July 9, 2026 22:31
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from 979ee5c to e88a652 Compare July 9, 2026 22:46

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

There are 11 total unresolved issues (including 7 from previous reviews).

Fix All in Cursor

❌ 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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 8 total unresolved issues (including 7 from previous reviews).

Fix All in Cursor

❌ 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.

@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 4 times, most recently from 07afc91 to 36d9255 Compare July 10, 2026 12:14
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 52e07f6 to 69d0289 Compare July 10, 2026 12:14
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 2 times, most recently from c61e735 to 7248300 Compare July 10, 2026 14:48
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch 2 times, most recently from 69d0289 to 9510b15 Compare July 10, 2026 18:04
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from 7248300 to 50ce000 Compare July 10, 2026 18:04
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 9510b15 to 61916ca Compare July 11, 2026 22:42
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 2 times, most recently from 03eeceb to fdd83ff Compare July 13, 2026 09:17
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 61916ca to 828e59f Compare July 13, 2026 09:17
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from fdd83ff to 735d2d1 Compare July 13, 2026 09:38
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 88e502d to cdb3108 Compare July 14, 2026 12:21
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from 735d2d1 to 36efbe1 Compare July 14, 2026 14:00
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 95b65dd to 83ad645 Compare July 15, 2026 11:20
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from 48335ee to 1e0251f Compare July 15, 2026 11:20
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 83ad645 to 1f35fd2 Compare July 15, 2026 13:21
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 2 times, most recently from 48dafff to f9f1f88 Compare July 15, 2026 13:37
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch 2 times, most recently from 83ad645 to 24ff2be Compare July 15, 2026 13:40
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 2 times, most recently from 72ca505 to f9f1f88 Compare July 15, 2026 13:54
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch 2 times, most recently from 83ad645 to 8889659 Compare July 15, 2026 14:18
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch 2 times, most recently from a1f3696 to f9f1f88 Compare July 15, 2026 14:49
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 8889659 to 83ad645 Compare July 15, 2026 14:49
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from f9f1f88 to f7642b4 Compare July 15, 2026 17:03
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 742a195 to 75e28c4 Compare July 15, 2026 17:12
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from f7642b4 to 8a0ff74 Compare July 15, 2026 17:12
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 75e28c4 to 54789f2 Compare July 15, 2026 18:18
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from 8a0ff74 to 40bde8d Compare July 15, 2026 18:18
Comment on lines +108 to +110
if (normalizedRequest.commandInput?.ScanIndexForward) {
spanAttributes[ATTR_AWS_DYNAMODB_SCAN_FORWARD] = normalizedRequest.commandInput.ScanIndexForward;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from 40bde8d to 508031c Compare July 16, 2026 19:09
@andreiborza
andreiborza force-pushed the ab/aws-sdk-server-utils branch from 54789f2 to 298d80e Compare July 16, 2026 19:09
@andreiborza
andreiborza force-pushed the ab/aws-sdk-services branch from 508031c to d7d156a Compare July 16, 2026 19:38
Comment on lines +122 to +124
if (normalizedRequest.commandInput?.Segment) {
spanAttributes[ATTR_AWS_DYNAMODB_SEGMENT] = normalizedRequest.commandInput?.Segment;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@andreiborza
andreiborza merged commit c36ff0e into develop Jul 16, 2026
318 of 348 checks passed
@andreiborza
andreiborza deleted the ab/aws-sdk-services branch July 16, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants