Skip to content

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

Draft
andreiborza wants to merge 2 commits into
ab/aws-sdk-server-utilsfrom
ab/aws-sdk-services
Draft

feat(server-utils): Port S3, Kinesis, DynamoDB, SecretsManager and StepFunctions aws-sdk extensions#22164
andreiborza wants to merge 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

}

if (response.data?.ScannedCount) {
span.setAttribute(ATTR_AWS_DYNAMODB_SCANNED_COUNT, response.data?.ScannedCount);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Truthy checks skip DynamoDB attributes

Medium Severity

Several DynamoDB span attributes are only set inside truthy if checks, so valid values like ScanIndexForward: false, parallel Segment: 0, and response Count or ScannedCount of zero never appear on spans even when the API returned them.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 03cef18. Configure here.

this._services.set('SFN', new StepFunctionsServiceExtension());
this._services.set('DynamoDB', new DynamodbServiceExtension());
this._services.set('S3', new S3ServiceExtension());
this._services.set('Kinesis', new KinesisServiceExtension());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Feat PR lacks integration tests

Low Severity

This feature adds five AWS service span extensions and registers them in ServicesExtensions, but the diff includes no integration or E2E test asserting the new span attributes (similar to existing orchestrion channel tests for Postgres).

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 03cef18. Configure here.

if (normalizedRequest.commandInput?.GlobalSecondaryIndexes) {
spanAttributes[ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] = toArray(
normalizedRequest.commandInput.GlobalSecondaryIndexes,
).map((x: Record<string, any>) => JSON.stringify(x));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Undocumented any in DynamoDB maps

Low Severity

New Record<string, any> annotations in DynamoDB index and capacity .map callbacks lack the required comment explaining why stricter typing is not used.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 03cef18. Configure here.

@andreiborza andreiborza force-pushed the ab/aws-sdk-services branch 3 times, most recently from c3ac3ce to 0e20b44 Compare July 9, 2026 21:48
this._services.set('SFN', new StepFunctionsServiceExtension());
this._services.set('DynamoDB', new DynamodbServiceExtension());
this._services.set('S3', new S3ServiceExtension());
this._services.set('Kinesis', new KinesisServiceExtension());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Feature lacks integration tests

Low Severity

This feat change registers new S3, Kinesis, DynamoDB, Secrets Manager, and Step Functions span attribute hooks, but the diff adds no unit, integration, or E2E coverage asserting those attributes on spans. Per project testing conventions, a feature PR should include at least one test exercising the new behavior.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 0e20b44. Configure here.

if (normalizedRequest.commandInput?.GlobalSecondaryIndexes) {
spanAttributes[ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] = toArray(
normalizedRequest.commandInput.GlobalSecondaryIndexes,
).map((x: Record<string, any>) => JSON.stringify(x));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Undocumented any in DynamoDB hooks

Low Severity

New DynamoDB extension code uses Record&lt;string, any&gt; in several .map callbacks when stringifying index and capacity objects. Project SDK guidelines require each new any use to include a comment explaining why safer typing is not practical.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 0e20b44. Configure here.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.59 kB - -
@sentry/browser - with treeshaking flags 26.03 kB - -
@sentry/browser (incl. Tracing) 46.34 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.13 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.12 kB - -
@sentry/browser (incl. Tracing, Replay) 85.62 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.26 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.32 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.97 kB - -
@sentry/browser (incl. Feedback) 44.76 kB - -
@sentry/browser (incl. sendFeedback) 32.38 kB - -
@sentry/browser (incl. FeedbackAsync) 37.51 kB - -
@sentry/browser (incl. Metrics) 28.67 kB - -
@sentry/browser (incl. Logs) 28.91 kB - -
@sentry/browser (incl. Metrics & Logs) 29.59 kB - -
@sentry/react 29.38 kB - -
@sentry/react (incl. Tracing) 48.61 kB - -
@sentry/vue 33.02 kB - -
@sentry/vue (incl. Tracing) 48.31 kB - -
@sentry/svelte 27.61 kB - -
CDN Bundle 30 kB - -
CDN Bundle (incl. Tracing) 48.32 kB - -
CDN Bundle (incl. Logs, Metrics) 31.57 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.64 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.81 kB - -
CDN Bundle (incl. Tracing, Replay) 85.84 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.14 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.64 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.92 kB - -
CDN Bundle - uncompressed 89.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.1 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.05 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.07 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.78 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.3 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.26 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.95 kB - -
@sentry/nextjs (client) 51.16 kB - -
@sentry/sveltekit (client) 46.78 kB - -
@sentry/core/server 78.43 kB - -
@sentry/core/browser 64.76 kB - -
@sentry/node-core 62.72 kB -0.01% -1 B 🔽
@sentry/node 125.37 kB - -
@sentry/node (incl. diagnostics channel injection) 140.49 kB +1.41% +1.94 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.72 kB - -
@sentry/node - without tracing 74.06 kB - -
@sentry/aws-serverless 83.25 kB -0.01% -2 B 🔽
@sentry/cloudflare (withSentry) - minified 181.71 kB - -
@sentry/cloudflare (withSentry) 449.16 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
this._services.set('SFN', new StepFunctionsServiceExtension());
this._services.set('DynamoDB', new DynamodbServiceExtension());
this._services.set('S3', new S3ServiceExtension());
this._services.set('Kinesis', new KinesisServiceExtension());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing integration or E2E tests

Medium Severity

This feat PR registers new AWS service span attribute extensions but the diff adds no unit, integration, or E2E test that exercises the orchestrion aws-sdk channel and asserts attributes such as aws.s3.bucket or db.* on emitted spans.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 979ee5c. Configure here.

if (normalizedRequest.commandInput?.GlobalSecondaryIndexes) {
spanAttributes[ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] = toArray(
normalizedRequest.commandInput.GlobalSecondaryIndexes,
).map((x: Record<string, any>) => JSON.stringify(x));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Undocumented any in DynamoDB mapper

Low Severity

New DynamoDB extension code uses Record<string, any> in several JSON.stringify map callbacks without comments explaining why stricter typing is not used, which violates SDK source typing guidelines for new any usage.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 979ee5c. Configure here.

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

this._services.set('SFN', new StepFunctionsServiceExtension());
this._services.set('DynamoDB', new DynamodbServiceExtension());
this._services.set('S3', new S3ServiceExtension());
this._services.set('Kinesis', new KinesisServiceExtension());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Feat PR lacks integration tests

Medium Severity

This feat adds five AWS service span extensions and registry wiring, but the diff includes no unit, integration, or E2E test asserting attributes such as aws.s3.bucket, DynamoDB db.* fields, or Secrets Manager ARNs on orchestrion aws-sdk spans.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit e88a652. Configure here.


if (response.data?.ScannedCount) {
span.setAttribute(ATTR_AWS_DYNAMODB_SCANNED_COUNT, response.data?.ScannedCount);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Zero counts omitted from spans

Low Severity

responseHook only sets aws.dynamodb.count and aws.dynamodb.scanned_count when response.data.Count and response.data.ScannedCount are truthy, so legitimate zero values from Query or Scan are never recorded on the span.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e88a652. Configure here.

if (operation === 'Scan') {
if (normalizedRequest.commandInput?.Segment) {
spanAttributes[ATTR_AWS_DYNAMODB_SEGMENT] = normalizedRequest.commandInput?.Segment;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Scan segment zero skipped

Low Severity

For Scan, aws.dynamodb.segment is set only when commandInput.Segment is truthy, so parallel scans using segment 0 never get the segment attribute on the span.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e88a652. Configure here.

if (normalizedRequest.commandInput?.GlobalSecondaryIndexes) {
spanAttributes[ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] = toArray(
normalizedRequest.commandInput.GlobalSecondaryIndexes,
).map((x: Record<string, any>) => JSON.stringify(x));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

any types lack justification comments

Low Severity

New Record<string, any> annotations in dynamodb.ts map callbacks have no comments explaining why stricter typing is not used, which violates SDK source typing conventions for this repo.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

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.

span.setAttribute(ATTR_AWS_DYNAMODB_SCANNED_COUNT, response.data?.ScannedCount);
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Feature lacks integration tests

Medium Severity

This feature adds several AWS service span attribute extensions but the diff includes no unit, integration, or E2E coverage. Per SDK testing conventions for feat PRs, at least one test should assert the new attributes on spans for services such as DynamoDB or S3.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit e88a652. Configure here.

@andreiborza andreiborza force-pushed the ab/aws-sdk-services branch from e88a652 to 5285a15 Compare July 9, 2026 22:55
andreiborza and others added 2 commits July 10, 2026 01:01
…epFunctions aws-sdk extensions

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andreiborza andreiborza force-pushed the ab/aws-sdk-services branch from 5285a15 to bb30365 Compare July 9, 2026 23:02
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.

1 participant