test(aws-serverless): Add Bedrock integration tests (Converse and InvokeModel)#22144
Closed
andreiborza wants to merge 3 commits into
Closed
test(aws-serverless): Add Bedrock integration tests (Converse and InvokeModel)#22144andreiborza wants to merge 3 commits into
andreiborza wants to merge 3 commits into
Conversation
Adds an OTel-free, orchestrion diagnostics-channel implementation of the aws-sdk (v3) instrumentation to `@sentry/server-utils`. The integration subscribes to the `orchestrion:<smithy-pkg>:send` channels the transform injects into the smithy `Client.prototype.send` (`@smithy/core`, `@smithy/smithy-client`, `@aws-sdk/smithy-client`) and emits the same spans as the OTel `@opentelemetry/instrumentation-aws-sdk` integration for every service (S3, DynamoDB, SQS, SNS, Lambda, Kinesis, SecretsManager, StepFunctions, Bedrock), with a distinct `auto.aws.orchestrion.aws-sdk` origin. SQS/SNS/Lambda trace propagation uses Sentry-native `sentry-trace`/`baggage` headers instead of OTel `propagation.inject`. Registered in `channelIntegrations`, so it is reachable via `@sentry/node`'s `experimentalUseDiagnosticsChannelInjection()`. No default behavior changes yet; the `@sentry/aws-serverless` swap follows in the next PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…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. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…okeModel) Covers the Bedrock gen_ai spans emitted by the aws-sdk integration for the non-streaming `Converse` and `InvokeModel` commands (request params, token usage, finish reasons), nock-mocked and asserted against both the OTel and diagnostics-channel paths via `isOrchestrionEnabled()`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
size-limit report 📦
|
62bb424 to
bdc838e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).Closes #issue_link_here