Uh oh!
There was an error while loading. Please reload this page.
feat(node): Update vercel ai integration attributes - #16721
Conversation
size-limit report 📦
|
55520e2 to
e3cfd57Compare
ArthurKnaus
left a comment
There was a problem hiding this comment.
🙌 thx for the quick changes!
mydea
commented
Jun 25, 2025
note: This may conflict with #16732, whatever we merge first needs to be adjusted accordingly! |
efdf029 to
6750b12Compare
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Bug: Span Attribute Modification Bug
The processToolCallSpan function incorrectly uses renameAttributeKey to modify a local attributes object, which is a snapshot of the span's data (from spanToJSON(span).data). This prevents the gen_ai.tool.name and gen_ai.tool.call.id attributes from being set on the actual span, unlike the previous direct span.setAttribute() calls. This also creates an inconsistency with other attributes correctly set on the span, and impacts the span's name update which relies on the gen_ai.tool.name attribute.
packages/core/src/utils/vercel-ai.ts#L118-L120
sentry-javascript/packages/core/src/utils/vercel-ai.ts
Lines 118 to 120 in c4f69a3
Was this report helpful? Give feedback by reacting with 👍 or 👎
Make changes to the Vercel AI integration as per https://www.notion.so/sentry/Agent-Monitoring-SDK-differences-21c8b10e4b5d80bcab51f72ae1418ea8
AI summary:
Key Improvements:
gen_ai.tool.inputandgen_ai.tool.outputattributesgen_ai.tool.type: 'function'for tool callsTechnical Changes:
renameAttributeKey()consistently instead of duplicating attributesai.*attributes after creating newgen_ai.*ones