Skip to content

feat(aws-serverless): Use orchestrion aws-sdk integration under diagnostics-channel opt-in#22143

Draft
andreiborza wants to merge 2 commits into
ab/aws-sdk-messagingfrom
ab/aws-sdk-serverless
Draft

feat(aws-serverless): Use orchestrion aws-sdk integration under diagnostics-channel opt-in#22143
andreiborza wants to merge 2 commits into
ab/aws-sdk-messagingfrom
ab/aws-sdk-serverless

Conversation

@andreiborza

@andreiborza andreiborza commented Jul 9, 2026

Copy link
Copy Markdown
Member

Wires the orchestrion aws-sdk channel integration into @sentry/aws-serverless, where the OTel Aws integration ships as a default today.

@sentry/node exposes a reusable applyDiagnosticsChannelInjectionIntegrations helper (extracted from its getDefaultIntegrations), and @sentry/aws-serverless uses it to swap the OTel Aws integration for the channel version when the app opts in via experimentalUseDiagnosticsChannelInjection() (now re-exported from the aws-serverless SDK). No change when the opt-in isn't used.

The existing aws-integration node-integration-tests assert the swapped origin via isOrchestrionEnabled(), so both the OTel and diagnostics-channel paths are covered by the same suites across both smithy stacks (latest + legacy 3.1041.0) and ESM/CJS. Only the expected origin is parametrized.

Part of #20946

Comment thread packages/aws-serverless/src/init.ts
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 27.6 kB - -
@sentry/browser - with treeshaking flags 26.04 kB - -
@sentry/browser (incl. Tracing) 46.35 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.14 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.13 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.33 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.99 kB - -
@sentry/browser (incl. Feedback) 44.78 kB - -
@sentry/browser (incl. sendFeedback) 32.4 kB - -
@sentry/browser (incl. FeedbackAsync) 37.53 kB - -
@sentry/browser (incl. Metrics) 28.68 kB - -
@sentry/browser (incl. Logs) 28.93 kB - -
@sentry/browser (incl. Metrics & Logs) 29.61 kB - -
@sentry/react 29.39 kB - -
@sentry/react (incl. Tracing) 48.62 kB - -
@sentry/vue 33.03 kB - -
@sentry/vue (incl. Tracing) 48.33 kB - -
@sentry/svelte 27.63 kB - -
CDN Bundle 30 kB - -
CDN Bundle (incl. Tracing) 48.33 kB - -
CDN Bundle (incl. Logs, Metrics) 31.58 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.65 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.82 kB - -
CDN Bundle (incl. Tracing, Replay) 85.84 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.16 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.33 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.07 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.03 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.05 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.76 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.24 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.98 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.93 kB - -
@sentry/nextjs (client) 51.17 kB - -
@sentry/sveltekit (client) 46.8 kB - -
@sentry/core/server 78.42 kB - -
@sentry/core/browser 64.77 kB - -
@sentry/node-core 62.72 kB - -
@sentry/node 125.33 kB - -
@sentry/node (incl. diagnostics channel injection) 141.67 kB +2.29% +3.17 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.73 kB +0.01% +1 B 🔺
@sentry/node - without tracing 74.04 kB - -
@sentry/aws-serverless 83.26 kB - -
@sentry/cloudflare (withSentry) - minified 181.47 kB - -
@sentry/cloudflare (withSentry) 448.98 kB - -

View base workflow run

@andreiborza andreiborza force-pushed the ab/aws-sdk-server-utils branch from 6b85478 to ca51438 Compare July 9, 2026 21:22
@andreiborza andreiborza changed the base branch from ab/aws-sdk-server-utils to ab/aws-sdk-messaging July 9, 2026 21:22
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch 2 times, most recently from bdc838e to 9297436 Compare July 9, 2026 21:35
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from 5069f36 to 6abbb22 Compare July 9, 2026 21:35
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch from 9297436 to 31816fd Compare July 9, 2026 21:44
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch 2 times, most recently from 1964abf to f024586 Compare July 9, 2026 21:48
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch 2 times, most recently from 0b89e37 to a3978fa Compare July 9, 2026 22:11
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from f024586 to 430affd Compare July 9, 2026 22:11

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

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 a3978fa. Configure here.

Comment thread packages/aws-serverless/src/init.ts
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from 430affd to d26e97f Compare July 9, 2026 22:13
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch from a3978fa to 809da29 Compare July 9, 2026 22:14
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from d26e97f to 711b9bd Compare July 9, 2026 22:31
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch from 809da29 to 8907ff9 Compare July 9, 2026 22:31
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from 711b9bd to 3f1cf4a Compare July 9, 2026 22:46
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch from 8907ff9 to c0e10d6 Compare July 9, 2026 22:46
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from 3f1cf4a to c43b14c Compare July 9, 2026 22:55
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch from c0e10d6 to 561e41b Compare July 9, 2026 22:55
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from c43b14c to d993b9e Compare July 9, 2026 23:02
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch from 561e41b to 8ffb46b Compare July 9, 2026 23:02
andreiborza and others added 2 commits July 10, 2026 09:38
…ostics-channel opt-in

Wires the orchestrion aws-sdk channel integration into `@sentry/aws-serverless`,
where the OTel `Aws` integration ships as a default today.

`@sentry/node` exposes a reusable `applyDiagnosticsChannelInjectionIntegrations`
helper (extracted from its `getDefaultIntegrations`), and `@sentry/aws-serverless`
uses it to swap the OTel `Aws` integration for the channel version when the app
opts in via `experimentalUseDiagnosticsChannelInjection()` (now re-exported from
the aws-serverless SDK). No change when the opt-in isn't used.

The existing `aws-integration` node-integration-tests assert the swapped origin
via `isOrchestrionEnabled()`, so both the OTel and diagnostics-channel paths are
covered by the same suites across both smithy stacks and ESM/CJS.

Part of #20946

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andreiborza andreiborza force-pushed the ab/aws-sdk-messaging branch from d993b9e to c2cad25 Compare July 10, 2026 07:40
@andreiborza andreiborza force-pushed the ab/aws-sdk-serverless branch from 8ffb46b to 556da6f Compare July 10, 2026 07:40
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