ref(core)!: Rename gen_ai.request.available_tools to gen_ai.tool.definitions - #22820
Merged
nicohrubec merged 1 commit intoAug 5, 2026
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
| @@ -59,7 +59,7 @@ export function extractRequestAttributes( | |||
| if (args.length > 0 && typeof args[0] === 'object' && args[0] !== null) { | |||
| 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 🤔
| @@ -125,7 +125,7 @@ export function extractRequestAttributes( | |||
| const functionDeclarations = config.tools.flatMap( | |||
| (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.
| @@ -206,7 +206,7 @@ export function instrumentCompiledGraphInvoke( | |||
| // Extract available tools from the graph instance | |||
| 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
nicohrubec
force-pushed
the
ref/genai-available-tools-to-tool-definitions
branch
from
July 30, 2026 05:15
7034b34 to
69fd4c9
Compare
nicohrubec
marked this pull request as draft
July 31, 2026 07:29
…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
August 4, 2026 13:24
69fd4c9 to
4d2e97b
Compare
nicohrubec
marked this pull request as ready for review
August 5, 2026 11:44
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 28, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 28, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 28, 2026
`gen_ai.request.available_tools`, `ai.tools` and `ai.prompt.tools` all replace onto `gen_ai.tool.definitions`, but none of the four named the others. `gen_ai.request.available_tools` even carried an empty `alias` array, and `ai.tools` had none at all, which is why the symmetry test stayed green. All four now list each other. Replaced by getsentry/sentry-javascript#22820 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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