feat(attributes): Add legacy Vercel AI span attributes (deprecated) - #583
Merged
JPeer264 merged 1 commit intoAug 28, 2026
Merged
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Other
Bug Fixes 🐛Names
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
JPeer264
force-pushed
the
jp/conv-vercel-ai-legacy-attrs
branch
from
August 27, 2026 07:59
af3a5bd to
6dc342f
Compare
JPeer264
force-pushed
the
jp/conv-vercel-ai-legacy-attrs
branch
from
August 27, 2026 08:11
6dc342f to
9236797
Compare
JPeer264
marked this pull request as ready for review
August 27, 2026 08:16
JPeer264
requested review from
a team,
Lms24,
cleptric,
mjq and
nsdeschenes
as code owners
August 27, 2026 08:16
vgrozdanic
approved these changes
Aug 27, 2026
Lms24
approved these changes
Aug 27, 2026
JPeer264
force-pushed
the
jp/conv-vercel-ai-legacy-attrs
branch
from
August 27, 2026 16:21
9236797 to
47c9c4f
Compare
JPeer264
force-pushed
the
jp/conv-vercel-ai-legacy-attrs
branch
from
August 27, 2026 16:30
47c9c4f to
36638b7
Compare
JPeer264
changed the base branch from
jp/conv-genai-cache-token-legacy
to
jp/conv-amqp-redis-legacy-attrs
August 27, 2026 16:30
JPeer264
force-pushed
the
jp/conv-vercel-ai-legacy-attrs
branch
from
August 27, 2026 16:49
36638b7 to
3292ff4
Compare
JPeer264
force-pushed
the
jp/conv-vercel-ai-legacy-attrs
branch
from
August 28, 2026 11:49
3292ff4 to
5ad029a
Compare
Adds the twelve `ai.*` and `gen_ai.*` attributes that the JavaScript SDK stopped emitting in v11 when the Vercel AI OTel span processor was removed. Six map onto a `gen_ai.*` replacement and join its alias group; the rest have no equivalent in the conventions and carry a reason only. `ai.prompt.tools` gets a replacement but no alias, so that the whole `gen_ai.tool.definitions` alias group can be completed in one place. Deprecated by getsentry/sentry-javascript#23384 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/conv-vercel-ai-legacy-attrs
branch
from
August 28, 2026 12:12
5ad029a to
d6de5de
Compare
Comment on lines
+13
to
+23
| "reason": "This attribute is being deprecated in favor of gen_ai.tool.definitions." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.prompt.tools attribute" | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Bug: The attribute ai.prompt.tools (a string[]) is configured to backfill to gen_ai.tool.definitions (a string), but their types are incompatible for a direct copy, which will cause ingestion failures.
Severity: HIGH
Suggested Fix
To resolve the type mismatch, either change _status from backfill to null and add a reason documenting the incompatibility, or change _status to transform and define a transformation to correctly convert the string[] value into a string.
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/ai/ai__prompt__tools.json#L1-L23
Potential issue: The configuration for `ai.prompt.tools` specifies `_status: "backfill"`
to migrate its value to the replacement attribute `gen_ai.tool.definitions`. However,
the source attribute is a `string[]` (array of strings) while the destination is a
`string`. The backfill process performs a direct value copy, which will fail due to this
type mismatch. This will cause the ingestion pipeline to fail or lead to data corruption
when processing spans containing the `ai.prompt.tools` attribute. Existing patterns in
the codebase for such type mismatches use `_status: null` with a reason or `_status:
"transform"` to handle the conversion.
4 tasks
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.
Adds the twelve
ai.*andgen_ai.*attributes that the JavaScript SDK stopped emitting in v11, when the Vercel AI OpenTelemetry span processor was removed.Six map onto a
gen_ai.*replacement and join its alias group:ai.model.id,ai.prompt,ai.response.id,ai.response.model,ai.usage.tokensandai.prompt.tools. The remaining six have no equivalent in the conventions and carry a reason only.ai.prompt.toolsgets a replacement but no alias here, so that the wholegen_ai.tool.definitionsalias group can be completed in one place, in the last PR of this stack.Deprecated by getsentry/sentry-javascript#23384