Repository navigation
feat(server-utils): Decide gen_ai content recording per call for Anthropic, Google GenAI and Mistral - #26470
Draft
sentry-junior[bot] wants to merge 3 commits into
Conversation
Contributor
size-limit report 📦Compared: ad98207 (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-providers
branch
2 times, most recently
from
November 17, 2026 12:53
546c3fe to
45e472a
Compare
mydea
reviewed
Nov 17, 2026
…ropic, Google GenAI and Mistral recordInputs and recordOutputs of anthropicAIIntegration, googleGenAIIntegration, mistralAIIntegration and their instrument*Client wrappers can be functions that decide per call. They get the operation and the request params as passed (for Anthropic tool runner spans: the tool and its input), and run once when the span starts, in the caller's async context. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
…AI and Mistral with node integration tests Replaces the per-call recording unit tests with one node integration test per integration that runs the real SDK against a mock server: a public call, a private call, and streams whose scope tag flips after they start. The Anthropic test also covers the tool runner's execute_tool spans. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
The Anthropic, Google GenAI and Mistral suites are not split into subdirectories, so the tests belong in each suite's test.ts. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
feat/gen-ai-per-call-recording-providers
branch
from
November 17, 2026 13:00
d5d3e15 to
9933911
Compare
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 Anthropic, Google GenAI and Mistral integrations and theirinstrument*Clientwrappers can now be functions that decide per call.Why
Stacked on #26464. This switches the next three providers to
GenAiCallOptions. The decision runs once when the span starts, in the caller's async context, and the end and stream paths reuse it.execute_toolspan decides when that tool call starts, not when the runner is created. A runner lives across many model turns and tool calls, so a decision made per call is the only one that can follow request-scoped state. The model calls a runner makes already go through the chat path, so they also decide per call. The tool span gets the runnable tool and its input as passed.requestis the first argument of the method as passed. Forchat.sendMessage()it does not include the config thatchats.create()stored on the chat, even though the span's attributes do use that config.dataCollection.genAIper call, not once at wrap time. A boolean option behaves the same as before.via @mydea.
--
View Session [Sentry]