ref(server-utils): Remove dead Vercel AI tool-call span-context tracking - #23298
Open
nicohrubec wants to merge 1 commit into
Open
ref(server-utils): Remove dead Vercel AI tool-call span-context tracking#23298nicohrubec wants to merge 1 commit into
nicohrubec wants to merge 1 commit into
Conversation
`toolCallSpanContextMap`, its two `_INTERNAL_` accessors, the `.set()` writer, and the `ToolCallSpanContext` type are leftovers of the old tool-error linking strategy from the vendored Node instrumentation. Its only consumer (`captureToolErrors`) was removed in #22747, and the current channel-based integration links tool errors via the active span instead (covered by the existing "captures error in tool" integration tests). The map was written on every tool span but never read, and never cleaned up — so this also removes a latent unbounded-growth leak. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
size-limit report 📦
|
nicohrubec
marked this pull request as ready for review
August 11, 2026 14:00
nicohrubec
requested review from
andreiborza,
logaretm and
stephanie-anderson
and removed request for
a team and
stephanie-anderson
August 11, 2026 14:00
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.
This mechanism is no longer needed but we still had these leftovers. We need to remove this because the map still gets filled with entries but these get never deleted resulting in a memory leak.