Repository navigation
feat(server-utils): Decide gen_ai content recording per call for pi-ai, Flue and pi-durable - #26472
Draft
sentry-junior[bot] wants to merge 2 commits into
Draft
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
Contributor
size-limit report 📦Compared: 3912827 (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-pi
branch
2 times, most recently
from
November 17, 2026 12:53
1bc6ec9 to
ee79e4b
Compare
…i, Flue and pi-durable `recordInputs`/`recordOutputs` of piAiIntegration, Flue and pi-durable can now be functions that decide for each call, from what the library hands over. A driver's functions run when the pi-ai span starts, and an explicit `false` from either side still wins. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
…rable with node integration tests Replaces the per-call recording unit tests with one node integration test per integration that runs the real library against its faux provider. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
feat/gen-ai-per-call-recording-pi
branch
from
November 17, 2026 13:01
ee79e4b to
de34e14
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/recordOutputsofpiAiIntegration, Flue and pi-durable can now be functions. Each one runs once, when its span starts, in the caller's async context. It gets the call as the library hands it over: pi-ai gets thestream/completearguments, and Flue and pi-durable get a model operation (chat) or a tool call (execute_tool).Why
Stacked on #26464. Apps that send content from both private and public conversations through one integration can now keep the private content out at the source, without scrubbing spans in
beforeSendSpan.Flue and pi-durable still pass their options to pi-ai through the scope. pi-ai calls their functions with the driver's own call info when the
gen_ai.chatspan starts, not when the scope is set, so each chat span still gets exactly one decision. The existing merge rule still applies: an explicitfalsefrom either side wins, whether it is a boolean or a function's return value. Otherwise the driver comes first, then pi-ai, thendataCollection.genAI. Flue tool spans now make their output decision when the tool starts instead of when it ends.via @mydea.
--
View Session [Sentry]