Uh oh!
There was an error while loading. Please reload this page.
feat(core): Disable gen_ai message truncation by default when streamGenAiSpans is enabled - #21603
Merged
Merged
Conversation
andreiborza
requested review from
JPeer264 and mydea
and removed request for
a teamJune 17, 2026 11:24
andreiborzaforce-pushed
the
ab/stream-genai-spans-disable-truncationa
branch
from
June 17, 2026 11:26
fd07b23 to
d2d45f5Compareandreiborza
requested review from
nicohrubec
and removed request for
JPeer264 and mydeaJune 17, 2026 11:26
…GenAiSpans` is enabled Setting `streamGenAiSpans: true` now disables gen_ai input truncation by default. Because gen_ai spans are sent as v2 span envelope items, they are not subject to the transaction payload-size limits that truncation works around. Set `enableTruncation: true` on the respective AI integration to opt back into truncation.
andreiborzaforce-pushed
the
ab/stream-genai-spans-disable-truncationa
branch
from
June 17, 2026 11:27
d2d45f5 to
f15a1f7CompareContributor
size-limit report 📦
|
| * Resolves whether truncation should be enabled. | ||
| * If the user explicitly set `enableTruncation`, that value is used. | ||
| * Otherwise, truncation is disabled when span streaming is active. | ||
| * Otherwise, truncation is disabled when gen_ai spans are streamed — either via full span |
Member
There was a problem hiding this comment.
nit: technically this should be more like "when gen_ai spans are sent through the span streaming/v2 path?
Uh oh!
There was an error while loading. Please reload this page.
| ### Important Changes | ||
| - **feat(core): Disable gen_ai message truncation by default when `streamGenAiSpans` is enabled ([#21603](https://github.com/getsentry/sentry-javascript/pull/21603))** |
Member
There was a problem hiding this comment.
l: should we call this out? I think enableTruncation is not even documented and was meant more for internal testing no?
MemberAuthor
There was a problem hiding this comment.
No, probably not. I'll move it out of important.
Co-authored-by: Nicolas Hrubec <nicolas.hrubec@outlook.com>
andreiborza
enabled auto-merge (squash)
June 17, 2026 14:56
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 freeto 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.
Setting
streamGenAiSpans: truenow disables gen_ai input truncation by default. Because gen_ai spans are sent as v2 span envelope items, they are not subject to the transaction payload-size limits that truncation works around.Set
enableTruncation: trueon the respective AI integration to opt back into truncation.