Skip to content

feat(server-utils): Port Bedrock aws-sdk extension and add integration tests - #22166

Merged
andreiborza merged 2 commits into
ab/aws-sdk-serverlessfrom
ab/aws-sdk-bedrock
Jul 16, 2026
Merged

feat(server-utils): Port Bedrock aws-sdk extension and add integration tests#22166
andreiborza merged 2 commits into
ab/aws-sdk-serverlessfrom
ab/aws-sdk-bedrock

Conversation

@andreiborza

@andreiborza andreiborza commented Jul 9, 2026

Copy link
Copy Markdown
Member

Ports the BedrockRuntime gen_ai service extension from the OTel aws-sdk integration to the orchestrion channel integration: chat span name and request parameters for Converse/ConverseStream, per-model-family request body parsing for InvokeModel/InvokeModelWithResponseStream (titan, nova, claude, llama, cohere, mistral), token usage and finish reasons from responses, and deferred span end for the streaming commands (the span ends when the wrapped stream is consumed).

Adds nock-mocked integration tests for the non-streaming Converse and InvokeModel commands, asserted against both the OTel and diagnostics-channel paths. The streaming commands use the AWS binary eventstream framing which nock cannot mock, so they stay untested here.

This completes orchestrion parity with the OTel aws-sdk integration.

User-facing differences to the vendored OTel instrumentation

  • ConverseStream callers receive the original response object with its stream wrapped in place, instead of a new object (a channel subscriber can't replace the resolved value); relevant only to identity-sensitive code

Fixes #20946

@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch 2 times, most recently from 188ac82 to ff165d4 Compare July 9, 2026 21:44
@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch from ff165d4 to a4dd353 Compare July 9, 2026 21:48
@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.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) 147.36 kB +3.34% +4.75 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB -0.01% -2 B 🔽
@sentry/node/light 51.33 kB - -
@sentry/node - without tracing 74.7 kB +0.01% +1 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-bedrock branch from 8f3599b to 0a944ab Compare July 9, 2026 22:46
@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch from 0a944ab to 5506257 Compare July 9, 2026 22:55
@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch 2 times, most recently from 14699e8 to a464258 Compare July 10, 2026 07:40
@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch 2 times, most recently from 2849cfe to 8e57368 Compare July 10, 2026 14:39
@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch 3 times, most recently from d096bd6 to 7813fbf Compare July 15, 2026 13:05
@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch 2 times, most recently from db6d0a5 to 86f20c1 Compare July 15, 2026 13:54

@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 86f20c1. Configure here.

@andreiborza
andreiborza force-pushed the ab/aws-sdk-bedrock branch 2 times, most recently from ee60599 to a94d0e5 Compare July 15, 2026 14:49

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice, didn't know that we support this already

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.

Rewrite @opentelemetry/instrumentation-aws-sdk to orchestrion

2 participants