Conversation
isaacs
requested review from
a team,
Lms24,
alexander-alderman-webb,
cleptric,
mjq and
nsdeschenes
as code owners
October 2, 2026 03:37
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Op
Bug Fixes 🐛
Internal Changes 🔧Deps
🤖 This preview updates automatically when you update the PR. |
andreiborza
approved these changes
Oct 5, 2026
The Vercel AI integration in sentry-javascript records the `experimental_telemetry.metadata` of an AI SDK call as `vercel.ai.telemetry.metadata.<key>` span attributes. SDK v10 did this through the AI SDK's own OTel spans. A fix in v11 restores it for `ai` 4 to 6 (getsentry/sentry-javascript#24721). The type is `any`. The AI SDK allows strings, numbers, booleans and arrays of these as metadata values, and the SDK sends them unchanged. The schema allows only one type per attribute, so `any` is the only type that covers all of these values. The docs content schema did not accept `any`, though `schemas/attribute.schema.json` allows it, as of #273. No attribute used `any` before. Related: getsentry/sentry-javascript#24721 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
If vercel ever does make it more strict, we can fold it in somewhere else.
isaacs
force-pushed
the
isaacs/vercel-ai-telemetry-metadata
branch
from
October 5, 2026 14:26
83d38bb to
19fbd7d
Compare
vgrozdanic
reviewed
Oct 5, 2026
| brief: z.string(), | ||
| has_dynamic_suffix: z.boolean().optional(), | ||
| type: z.enum(['string', 'boolean', 'integer', 'double', 'string[]', 'boolean[]', 'integer[]', 'double[]']), | ||
| type: z.enum(['string', 'boolean', 'integer', 'double', 'string[]', 'boolean[]', 'integer[]', 'double[]', 'any']), |
Member
There was a problem hiding this comment.
I believe we don't support objects (which any could be) yet in EAP?
If not, i am afraid we must stringify this before sending, otherwise they might get dropped during ingestion, so iiuc this shouldn't be any just yet?
This branch was successfully deployed
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.
The Vercel AI integration in sentry-javascript records the
experimental_telemetry.metadataof an AI SDK call asvercel.ai.telemetry.metadata.<key>span attributes. SDK v10 did this through the AI SDK's own OTel spans. A fix in v11 restores it forai4 to 6 (getsentry/sentry-javascript#24721).The type is
any. The AI SDK allows strings, numbers, booleans and arrays of these as metadata values, and the SDK sends them unchanged. The schema allows only one type per attribute, soanyis the only type that covers all of these values.The docs content schema did not accept
any, thoughschemas/attribute.schema.jsonallows it, as of #273. No attribute usedanybefore.Related: getsentry/sentry-javascript#24721
PR Checklist
yarn testand verified that the tests pass.yarn generateto generate and format code and docs.If an attribute was added:
nextjs.function_id, notfunction_id)apply_scrubbing(i.e.manualorauto. Useneveronly for values that should never be scrubbed such as IDs)If an attribute was deprecated: