Skip to content

feat(attributes): Complete the gen_ai.tool.definitions alias group - #595

Merged
Lms24 merged 2 commits into
mainfrom
jp/conv-gen-ai-tool-definitions-alias
Sep 9, 2026
Merged

feat(attributes): Complete the gen_ai.tool.definitions alias group#595
Lms24 merged 2 commits into
mainfrom
jp/conv-gen-ai-tool-definitions-alias

Conversation

@JPeer264

Copy link
Copy Markdown
Member

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.

Supersedes #590, which GitHub auto-closed during a rebase of the stack.

Replaced by getsentry/sentry-javascript#22820

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Complete the gen_ai.tool.definitions alias group by JPeer264 in #595
  • Add sveltekit.* attributes emitted by SvelteKit's native spans by Lms24 in #611
  • Add browser.navigation.type, move navigation.* to router.navigation.* by logaretm in #600
  • Add langchain.chain.name (deprecated) in favor of gen_ai.pipeline.name by RulaKhaled in #599
  • Add browser.paint.type by Lms24 in #606

Descriptions

  • Add more fine grained function.gcp span description rules by Lms24 in #624
  • Add graphql span description rules by Lms24 in #616

Names

  • Add FAAS function span name and description rules by Lms24 in #617
  • Add function span name and description rules by Lms24 in #618
  • Add browser.* span name and description rules by Lms24 in #607
  • Add cache span name rules by Lms24 in #605

Other

  • (op) Add mobile OTA update span operations by antonis in #540
  • (search-attributes) Add search attribute names by nsdeschenes in #610

Bug Fixes 🐛

  • (descriptions) Add graphql-enhanced http.client span description template by Lms24 in #613

Internal Changes 🔧

Deps

  • Bump astro from 7.1.0 to 7.2.8 by dependabot in #628
  • Bump sharp from 0.35.3 to 0.35.4 by dependabot in #630
  • Bump js-yaml from 4.3.1 to 4.3.2 by dependabot in #631
  • Bump svgo from 4.0.2 to 4.1.0 by dependabot in #627
  • Bump browserslist from 4.28.2 to 4.28.8 by dependabot in #614
  • Bump fast-uri from 3.1.5 to 3.1.7 by dependabot in #612

Names

  • Clarify GraphQL OTel divergence note by andreiborza in #626
  • Add OTel divergence note for graphql span names by Lms24 in #615

Other

  • (attributes) Clarify parameter name casing by Lms24 in #632
  • (deps-dev) Bump vitest from 4.1.9 to 4.1.11 by dependabot in #629
  • (descriptions) Fix http.client span description example by Lms24 in #603

🤖 This preview updates automatically when you update the PR.

@JPeer264
JPeer264 marked this pull request as ready for review August 27, 2026 16:45
@JPeer264
JPeer264 requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners August 27, 2026 16:45
@JPeer264
JPeer264 force-pushed the jp/conv-gen-ai-tool-definitions-alias branch from ab9324d to 640063f Compare August 27, 2026 16:49
Comment thread model/attributes/gen_ai/gen_ai__tool__definitions.json
@JPeer264
JPeer264 force-pushed the jp/conv-gen-ai-tool-definitions-alias branch from 640063f to 684df12 Compare August 27, 2026 17:29

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gen_ai aliases look correct but for the ai ones please see the Seer comment

Comment thread model/attributes/gen_ai/gen_ai__tool__definitions.json
@JPeer264
JPeer264 force-pushed the jp/conv-gen-ai-tool-definitions-alias branch from 684df12 to 67174a2 Compare August 28, 2026 11:49
@JPeer264
JPeer264 force-pushed the jp/conv-gen-ai-tool-definitions-alias branch from 67174a2 to 906fc56 Compare August 28, 2026 12:12
Base automatically changed from jp/conv-net-alias-fixes to main August 28, 2026 12:26
@JPeer264
JPeer264 force-pushed the jp/conv-gen-ai-tool-definitions-alias branch from 906fc56 to c424824 Compare August 28, 2026 12:26
@JPeer264
JPeer264 requested a review from Lms24 August 28, 2026 13:00
@JPeer264
JPeer264 force-pushed the jp/conv-gen-ai-tool-definitions-alias branch 2 times, most recently from 49d3733 to ef2fb47 Compare September 9, 2026 09:28
JPeer264 and others added 2 commits September 9, 2026 20:00
`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>
…initions

The ai.tools and ai.prompt.tools attributes are string[], while
gen_ai.tool.definitions and gen_ai.request.available_tools are string.
Type-diverging attributes are not aliases, so keep only the deprecation
replacement chain for the ai.* attributes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the jp/conv-gen-ai-tool-definitions-alias branch from ef2fb47 to a80026e Compare September 9, 2026 18:02
Comment on lines 7 to +13
},
"is_in_otel": true,
"example": "[{\"type\": \"function\", \"name\": \"get_current_weather\", \"description\": \"Get the current weather in a given location\", \"parameters\": {\"type\": \"object\", \"properties\": {\"location\": {\"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\"}, \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]}}, \"required\": [\"location\", \"unit\"]}}]",
"alias": ["gen_ai.request.available_tools"],
"visibility": "public",
"changelog": [
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The logic in deriveAttributeKeyChains filters out deprecated aliases, creating an asymmetric chain expansion despite symmetric alias definitions in the JSON, causing inconsistent attribute chains.
Severity: MEDIUM

Suggested Fix

The logic in deriveAttributeKeyChains should be adjusted to handle symmetric aliases involving deprecated attributes correctly. The filtering that removes deprecated aliases from a stable attribute's alias expansion should be re-evaluated to ensure that chain membership remains consistent across all members of an alias group, regardless of their deprecation status.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: model/attributes/gen_ai/gen_ai__tool__definitions.json#L7-L13

Potential issue: The introduction of a symmetric alias between the stable attribute
`gen_ai.tool.definitions` and the deprecated attribute `gen_ai.request.available_tools`
creates an inconsistency in how attribute chains are generated. The
`deriveAttributeKeyChains` function filters out deprecated aliases when expanding the
chain for a stable attribute. As a result, the chain for `gen_ai.tool.definitions` will
not include `gen_ai.request.available_tools`. Conversely,
`gen_ai.request.available_tools`, being a rewriting deprecation, will join the chain of
its replacement, `gen_ai.tool.definitions`. This asymmetry means the two attributes will
not agree on their chain membership, which is expected to cause the test 'agrees on
chain membership between every pair of chained attributes' to fail.

@Lms24
Lms24 merged commit 8ce1634 into main Sep 9, 2026
16 checks passed
@Lms24
Lms24 deleted the jp/conv-gen-ai-tool-definitions-alias branch September 9, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants