Skip to content

Conversation

@RulaKhaled
Copy link
Member

AI integrations should follow OTel spec and report the gen_ai.operation.name with the values listed in sentry conventions if applies getsentry/sentry-conventions#225

Closes https://linear.app/getsentry/issue/JS-1527/report-well-known-values-in-gen-aioperationname-attribute

@linear
Copy link

linear bot commented Jan 21, 2026

@RulaKhaled RulaKhaled requested a review from nicohrubec January 21, 2026 16:04
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

if (attributes[OPERATION_NAME_ATTRIBUTE]) {
const operationName = mapVercelAiOperationName(attributes[OPERATION_NAME_ATTRIBUTE] as string);
attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE] = operationName;
}
Copy link

Choose a reason for hiding this comment

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

Original attribute not deleted after mapping operation name

Low Severity

The new code for mapping OPERATION_NAME_ATTRIBUTE to GEN_AI_OPERATION_NAME_ATTRIBUTE sets the new attribute with the mapped value but does not delete the original operation.name attribute. This is inconsistent with all other attribute processing in processEndedVercelAiSpan, which uses renameAttributeKey to delete the old key after copying. The comment says "Rename AI SDK attributes" but the implementation only adds without deleting, leaving stale operation.name values (e.g., 'ai.generateText') on spans alongside the new gen_ai.operation.name values (e.g., 'generate_content').

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.2 kB - -
@sentry/browser - with treeshaking flags 23.71 kB - -
@sentry/browser (incl. Tracing) 42.02 kB - -
@sentry/browser (incl. Tracing, Profiling) 46.66 kB - -
@sentry/browser (incl. Tracing, Replay) 80.63 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.28 kB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 85.32 kB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 97.53 kB - -
@sentry/browser (incl. Feedback) 41.92 kB - -
@sentry/browser (incl. sendFeedback) 29.89 kB - -
@sentry/browser (incl. FeedbackAsync) 34.89 kB - -
@sentry/browser (incl. Metrics) 26.31 kB - -
@sentry/browser (incl. Logs) 26.46 kB +0.01% +1 B 🔺
@sentry/browser (incl. Metrics & Logs) 27.11 kB - -
@sentry/react 26.93 kB - -
@sentry/react (incl. Tracing) 44.26 kB -0.01% -1 B 🔽
@sentry/vue 29.64 kB +0.01% +1 B 🔺
@sentry/vue (incl. Tracing) 43.82 kB - -
@sentry/svelte 25.22 kB - -
CDN Bundle 27.78 kB - -
CDN Bundle (incl. Tracing) 42.83 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 43.65 kB - -
CDN Bundle (incl. Tracing, Replay) 79.53 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 84.97 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 85.89 kB - -
CDN Bundle - uncompressed 81.27 kB - -
CDN Bundle (incl. Tracing) - uncompressed 126.81 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 129.65 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 243.35 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 256.15 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 258.96 kB - -
@sentry/nextjs (client) 46.62 kB - -
@sentry/sveltekit (client) 42.39 kB - -
@sentry/node-core 51.9 kB - -
@sentry/node 165.51 kB +0.06% +90 B 🔺
@sentry/node - without tracing 93.66 kB - -
@sentry/aws-serverless 109.16 kB +0.01% +3 B 🔺

View base workflow run

@github-actions
Copy link
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 11,328 - 8,959 +26%
GET With Sentry 1,972 17% 1,585 +24%
GET With Sentry (error only) 7,705 68% 6,016 +28%
POST Baseline 1,144 - 1,171 -2%
POST With Sentry 597 52% 570 +5%
POST With Sentry (error only) 1,038 91% 1,030 +1%
MYSQL Baseline 4,047 - 3,248 +25%
MYSQL With Sentry 525 13% 358 +47%
MYSQL With Sentry (error only) 3,322 82% 2,590 +28%

View base workflow run

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