Repository navigation
feat(server-utils): Decide gen_ai content recording per call for Mastra, TypeSafe, Workers AI and Bedrock - #26471
Draft
sentry-junior[bot] wants to merge 3 commits into
Conversation
Contributor
size-limit report 📦Compared: e86656f (PR test merge using feat/gen-ai-per-call-recording at aa56820) Against: 93949c4 (feat/gen-ai-per-call-recording) · base run #66413
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 59 successful. See the run.
Successful checks
|
sentry-junior
Bot
force-pushed
the
feat/gen-ai-per-call-recording-misc
branch
2 times, most recently
from
November 17, 2026 12:50
bbde65d to
defe339
Compare
…ra, TypeSafe, Workers AI and Bedrock recordInputs and recordOutputs of mastraIntegration, typesafeIntegration, instrumentTypeSafeClient, instrumentWorkersAiClient and awsIntegration (Bedrock Runtime) can be functions that decide per call. They run once when the call starts, in the caller's async context, and the end and response paths reuse that decision. Mastra decides per span when the exporter receives its start, so its functions run at export time. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
…Bedrock with node integration tests Replaces the per-call recording unit tests for Mastra, TypeSafe and Bedrock with one node integration test each. Workers AI has no node suite, so it keeps one focused unit test. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
feat/gen-ai-per-call-recording-misc
branch
from
November 17, 2026 13:02
defe339 to
a1d63ef
Compare
…segment ends Under Deno the mock server's http.server span container arrives first, so wait for the scenario's spans like the neighbouring TypeSafe tests do.
This branch has not been deployed
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.
What
recordInputs/recordOutputsof the Mastra, TypeSafe, Workers AI and AWS (Bedrock Runtime) integrations and manual wrappers can now be functions that decide per call. Booleans work as before.Why
Stacked on #26464. Same contract as OpenAI there: each function runs once per call when it starts, in the caller's async context, and the end/response/stream paths reuse that decision.
span_started, not in the code that started the span. The JSDoc says so. Updates and the end reuse the decision, and so does the classifier evaluation call.WeakMapkeyed by the normalized request, which the response hooks get back.AwsIntegrationOptionstakes Bedrock's call info, since Bedrock is the only AWS service that records content.run()arguments as-is plus the derivedoperation, because one binding serves several operations.via @mydea.
--
View Session [Sentry]