Repository navigation
feat(server-utils): Decide gen_ai content recording per call for Vercel AI - #26468
Open
sentry-junior[bot] wants to merge 4 commits into
Open
sentry-junior[bot] wants to merge 4 commits into
sentry-junior[bot] wants to merge 4 commits into
Conversation
Contributor
size-limit report 📦Compared: f6eae3d (PR test merge using develop at 0a411f9) Against: 524bd26 (develop) · base run #66453
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 60 successful. See the run.
Successful checks
|
mydea
reviewed
Nov 17, 2026
sentry-junior
Bot
force-pushed
the
feat/gen-ai-per-call-recording-vercel-ai
branch
2 times, most recently
from
November 17, 2026 12:47
a6491a7 to
af1d2da
Compare
mydea
reviewed
Nov 17, 2026
mydea
marked this pull request as ready for review
November 17, 2026 12:52
javascript-sdk-gitflow
Bot
requested review from
RulaKhaled,
andreiborza and
timfish
November 17, 2026 12:52
…el AI recordInputs and recordOutputs of vercelAIIntegration can be functions that decide per span. They get the channel event type and the AI SDK telemetry event, and run once when the span starts, in the caller's async context. Their result takes the place of the integration option in the existing precedence, so eve mode and the AI SDK's per-call flags still apply when it is undefined. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
… integration test Replaces the per-call recording unit test with a node integration test on ai v7's native ai:telemetry path. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
…v7 generation suite Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
feat/gen-ai-per-call-recording-vercel-ai
branch
from
November 17, 2026 13:00
92a42ec to
e1b6a4a
Compare
andreiborza
approved these changes
Nov 17, 2026
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/recordOutputsofvercelAIIntegrationcan now be functions that decide for each span. They get{ type, event }: theai:telemetryevent type and the AI SDK telemetry event as published.Why
Stacked on #26464. Same feature as OpenAI there, but Vercel AI has its own precedence (integration option > eve mode > the AI SDK's per-call flag >
dataCollection.genAI), and whetheraiwithheld the result (which turns eve mode off) is only known at span end. So the function runs once at span start, in the caller's async context. Its result is stored on the span and takes the place of the integration option. The rest of the chain is still applied at end, as before. If the function returnsundefined, eve mode and the per-call flags still decide. Booleans behave as before.The function runs per span, not once per root call. Each span has its own content (model-call messages, tool arguments), and the event that holds that content is the one the user should decide on. Users who want one decision per AI SDK call can filter on
typeor useevent.callId. A streamedinvoke_agentspan gets its output from its model calls, but it uses its own start-time decision. Onai<= 6 (orchestrion),eventis the adapter's rebuilt event, not a native one.via @mydea.
--
View Session [Sentry]