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

@andreiborzaandreiborza 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
andreiborzaforce-pushed the ab/aws-sdk-services branch 3 times, most recently from c3ac3ce to 0e20b44CompareJuly 9, 2026 21:48
@github-actions

github-actionsBot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.74 kB--
@sentry/browser - with treeshaking flags26.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 flags75.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/react29.54 kB--
@sentry/react (incl. Tracing)48.82 kB--
@sentry/vue33.17 kB--
@sentry/vue (incl. Tracing)48.55 kB--
@sentry/svelte27.77 kB--
CDN Bundle30.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 - uncompressed89.85 kB--
CDN Bundle (incl. Tracing) - uncompressed146.66 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed94.56 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed150.64 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed219.28 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed265.86 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed269.82 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed279.56 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed283.52 kB--
@sentry/nextjs (client)51.38 kB--
@sentry/sveltekit (client)47 kB--
@sentry/core/server78.71 kB--
@sentry/core/browser65.08 kB--
@sentry/node-core63.21 kB+0.01%+1 B 🔺
@sentry/node125.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/light51.33 kB-0.01%-1 B 🔽
@sentry/node - without tracing74.7 kB+0.01%+2 B 🔺
@sentry/aws-serverless83.92 kB--
@sentry/cloudflare (withSentry) - minified182.1 kB--
@sentry/cloudflare (withSentry)450.9 kB--

View base workflow run

@andreiborza
andreiborzaforce-pushed the ab/aws-sdk-services branch 3 times, most recently from 078c598 to 979ee5cCompareJuly 9, 2026 22:31

@cursorcursorBot 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.

@cursorcursorBot 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
andreiborzaforce-pushed the ab/aws-sdk-services branch 4 times, most recently from 07afc91 to 36d9255CompareJuly 10, 2026 12:14
@andreiborza
andreiborzaforce-pushed the ab/aws-sdk-services branch 2 times, most recently from c61e735 to 7248300CompareJuly 10, 2026 14:48
@andreiborza
andreiborzaforce-pushed the ab/aws-sdk-services branch 2 times, most recently from 03eeceb to fdd83ffCompareJuly 13, 2026 09:17
@andreiborza
andreiborzaforce-pushed the ab/aws-sdk-services branch 2 times, most recently from 48dafff to f9f1f88CompareJuly 15, 2026 13:37
@andreiborza
andreiborzaforce-pushed the ab/aws-sdk-services branch 2 times, most recently from 72ca505 to f9f1f88CompareJuly 15, 2026 13:54
@andreiborza
andreiborzaforce-pushed the ab/aws-sdk-services branch 2 times, most recently from a1f3696 to f9f1f88CompareJuly 15, 2026 14:49
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.

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 developJul 16, 2026
318 of 348 checks passed
@andreiborza
andreiborza deleted the ab/aws-sdk-services branch July 16, 2026 19:59
Sign up for freeto 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

@andreiborza@nicohrubec