ref(core)!: Rename gen_ai.request.available_tools to gen_ai.tool.definitions - #22820
Open
nicohrubec wants to merge 1 commit into
Open
Conversation
Contributor
size-limit report 📦
|
nicohrubec
marked this pull request as ready for review
July 29, 2026 12:42
nicohrubec
requested review from
andreiborza,
isaacs and
mydea
and removed request for
a team
July 29, 2026 12:42
andreiborza
approved these changes
Jul 29, 2026
| const params = args[0] as Record<string, unknown>; | ||
| if (params.tools && Array.isArray(params.tools)) { | ||
| attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS] = JSON.stringify(params.tools); | ||
| attributes[GEN_AI_TOOL_DEFINITIONS] = JSON.stringify(params.tools); |
Member
There was a problem hiding this comment.
q: Should we be more defensive with stringifying here? I think we have a helper for that now 🤔
| (tool: { functionDeclarations: unknown[] }) => tool.functionDeclarations, | ||
| ); | ||
| attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS] = JSON.stringify(functionDeclarations); | ||
| attributes[GEN_AI_TOOL_DEFINITIONS] = JSON.stringify(functionDeclarations); |
Member
There was a problem hiding this comment.
And here too, more defensive stringifying.
| const tools = extractToolsFromCompiledGraph(graphInstance); | ||
| if (tools) { | ||
| span.setAttribute(GEN_AI_REQUEST_AVAILABLE_TOOLS, JSON.stringify(tools)); | ||
| span.setAttribute(GEN_AI_TOOL_DEFINITIONS, JSON.stringify(tools)); |
nicohrubec
force-pushed
the
ref/genai-available-tools-to-tool-definitions
branch
from
July 29, 2026 14:02
485d347 to
7034b34
Compare
…efinitions` Emit the `gen_ai.tool.definitions` attribute from `@sentry/conventions` instead of the deprecated `gen_ai.request.available_tools` alias across all AI integrations (OpenAI, Anthropic, Google GenAI, LangChain, LangGraph, Vercel AI). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nicohrubec
force-pushed
the
ref/genai-available-tools-to-tool-definitions
branch
from
July 30, 2026 05:15
7034b34 to
69fd4c9
Compare
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.
Switches all AI integrations from the deprecated
gen_ai.request.available_toolsattribute to its@sentry/conventionsreplacementgen_ai.tool.definitions.Part of #22482