-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat(attributes): Add legacy Vercel AI span attributes (deprecated) #583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JPeer264
merged 1 commit into
jp/conv-amqp-redis-legacy-attrs
from
jp/conv-vercel-ai-legacy-attrs
Aug 28, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "key": "ai.model.id", | ||
| "brief": "The id of the model used by the Vercel AI SDK.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["gpt-4o"], | ||
| "alias": ["gen_ai.request.model", "ai.model_id"], | ||
| "deprecation": { | ||
| "_status": "backfill", | ||
| "replacement": "gen_ai.request.model", | ||
| "reason": "This attribute is being deprecated in favor of gen_ai.request.model." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.model.id attribute" | ||
| } | ||
| ] | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "key": "ai.prompt", | ||
| "brief": "The prompt passed to the Vercel AI SDK, as a stringified object.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["{\"prompt\":\"What is the weather in Paris?\"}"], | ||
| "alias": ["gen_ai.input.messages", "ai.texts", "ai.prompt.messages", "gen_ai.prompt"], | ||
| "deprecation": { | ||
| "_status": "backfill", | ||
| "replacement": "gen_ai.input.messages", | ||
| "reason": "This attribute is being deprecated in favor of gen_ai.input.messages." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.prompt attribute" | ||
| } | ||
| ] | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "key": "ai.prompt.tools", | ||
| "brief": "The tools made available to the model, as an array of stringified tool definitions.", | ||
| "type": "string[]", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": [["{\"type\":\"function\",\"name\":\"get_weather\"}"]], | ||
| "deprecation": { | ||
| "_status": "backfill", | ||
| "replacement": "gen_ai.tool.definitions", | ||
| "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" | ||
| } | ||
| ] | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "key": "ai.response.id", | ||
| "brief": "The id of the response returned by the model.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["chatcmpl-BuKJgVSKAMTUYbBSjHTMUuNGKzOPY"], | ||
| "alias": ["gen_ai.response.id", "ai.generation_id"], | ||
| "deprecation": { | ||
| "_status": "backfill", | ||
| "replacement": "gen_ai.response.id", | ||
| "reason": "This attribute is being deprecated in favor of gen_ai.response.id." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.response.id attribute" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "key": "ai.response.model", | ||
| "brief": "The id of the model that produced the response.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["gpt-4o-2024-08-06"], | ||
| "alias": ["gen_ai.response.model"], | ||
| "deprecation": { | ||
| "_status": "backfill", | ||
| "replacement": "gen_ai.response.model", | ||
| "reason": "This attribute is being deprecated in favor of gen_ai.response.model." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.response.model attribute" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "key": "ai.response.object", | ||
| "brief": "The type of the object returned by the model.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["chat.completion"], | ||
| "deprecation": { | ||
| "_status": null, | ||
| "reason": "This attribute is deprecated. The Sentry conventions have no replacement for the raw Vercel AI response object type." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.response.object attribute" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "key": "ai.response.timestamp", | ||
| "brief": "The ISO 8601 timestamp at which the response was produced.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["2026-02-19T15:32:11.000Z"], | ||
| "deprecation": { | ||
| "_status": null, | ||
| "reason": "This attribute is deprecated. The span start and end timestamps carry the same information." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.response.timestamp attribute" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "key": "ai.schema", | ||
| "brief": "The stringified JSON schema the model output must conform to.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}}}"], | ||
| "deprecation": { | ||
| "_status": null, | ||
| "reason": "This attribute is deprecated. The Sentry conventions have no replacement for the requested output schema." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.schema attribute" | ||
| } | ||
| ] | ||
| } |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "key": "ai.usage.tokens", | ||
| "brief": "The total number of tokens used for the request and the response.", | ||
| "type": "integer", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": [150], | ||
| "alias": ["gen_ai.usage.total_tokens", "ai.total_tokens.used"], | ||
| "deprecation": { | ||
| "_status": "backfill", | ||
| "replacement": "gen_ai.usage.total_tokens", | ||
| "reason": "This attribute is being deprecated in favor of gen_ai.usage.total_tokens." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.usage.tokens attribute" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "key": "ai.values", | ||
| "brief": "The stringified values produced by a Vercel AI SDK object or array generation.", | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "manual" | ||
| }, | ||
| "is_in_otel": false, | ||
| "examples": ["[{\"city\":\"Paris\"}]"], | ||
| "deprecation": { | ||
| "_status": null, | ||
| "reason": "This attribute is deprecated. Use gen_ai.output.messages for model output instead." | ||
| }, | ||
| "visibility": "public", | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "prs": [583], | ||
| "description": "Added ai.values attribute" | ||
| } | ||
| ] | ||
| } |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The attribute
ai.prompt.tools(astring[]) is configured tobackfilltogen_ai.tool.definitions(astring), 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
_statusfrombackfilltonulland add a reason documenting the incompatibility, or change_statustotransformand define a transformation to correctly convert thestring[]value into astring.Prompt for AI Agent