Skip to content

Conversation

@RulaKhaled
Copy link
Member

@RulaKhaled RulaKhaled commented Jan 21, 2026

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, this PR renames gen_ai.operation so that if one of values applies, then that value MUST be used.

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
cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.32 kB - -
@sentry/browser - with treeshaking flags 23.83 kB - -
@sentry/browser (incl. Tracing) 42.14 kB - -
@sentry/browser (incl. Tracing, Profiling) 46.78 kB - -
@sentry/browser (incl. Tracing, Replay) 80.75 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.4 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 85.47 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 97.65 kB - -
@sentry/browser (incl. Feedback) 42.04 kB - -
@sentry/browser (incl. sendFeedback) 30.01 kB - -
@sentry/browser (incl. FeedbackAsync) 35.01 kB - -
@sentry/browser (incl. Metrics) 26.43 kB - -
@sentry/browser (incl. Logs) 26.57 kB - -
@sentry/browser (incl. Metrics & Logs) 27.24 kB - -
@sentry/react 27.05 kB - -
@sentry/react (incl. Tracing) 44.37 kB - -
@sentry/vue 29.76 kB - -
@sentry/vue (incl. Tracing) 43.93 kB - -
@sentry/svelte 25.33 kB - -
CDN Bundle 27.89 kB - -
CDN Bundle (incl. Tracing) 42.93 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 43.75 kB - -
CDN Bundle (incl. Tracing, Replay) 79.68 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.11 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.03 kB - -
CDN Bundle - uncompressed 81.6 kB - -
CDN Bundle (incl. Tracing) - uncompressed 127.14 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 129.97 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 243.74 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 256.54 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 259.35 kB - -
@sentry/nextjs (client) 46.73 kB - -
@sentry/sveltekit (client) 42.51 kB - -
@sentry/node-core 52.01 kB +0.01% +1 B 🔺
@sentry/node 165.7 kB +0.09% +136 B 🔺
@sentry/node - without tracing 93.76 kB - -
@sentry/aws-serverless 109.28 kB - -

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

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 9,014 - 9,236 -2%
GET With Sentry 1,710 19% 1,705 +0%
GET With Sentry (error only) 6,148 68% 6,023 +2%
POST Baseline 1,211 - 1,215 -0%
POST With Sentry 602 50% 578 +4%
POST With Sentry (error only) 1,078 89% 1,063 +1%
MYSQL Baseline 3,282 - 3,380 -3%
MYSQL With Sentry 496 15% 467 +6%
MYSQL With Sentry (error only) 2,738 83% 2,751 -0%

View base workflow run

@RulaKhaled RulaKhaled force-pushed the rolaabuhasna/js-1527-report-well-known-values-in-gen_aioperationname-attribute branch from 4bc1034 to ea1883c Compare January 22, 2026 10:30
cursor[bot]

This comment was marked as outdated.

{
name: `${operationName} ${modelName}`,
op: 'gen_ai.pipeline',
op: 'gen_ai.invoke_agent',
Copy link
Member

Choose a reason for hiding this comment

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

m: isn't this for single llm calls? in that case wouldn't chat be more suitable?

Copy link
Member

Choose a reason for hiding this comment

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

because langchain also has a separate create_agent API: https://docs.langchain.com/oss/python/langchain/agents#static-model

so to me it would seem that we should use chat for individual invokations and invoke_agent if the agent is invoked

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense, i kept going back and forth on this one. having a separate create_agent API settles it

}
// Return the original value for unknown operations
return operationName;
}
Copy link
Member

Choose a reason for hiding this comment

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

l: I think it would be better to use sets in this method and then just do a lookup in the condition e.g. INVOKE_AGENT_OPS that contains the operations we want to map to invoke_agent

Copy link
Member Author

Choose a reason for hiding this comment

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

Totally reasonable

cursor[bot]

This comment was marked as outdated.

@andreiborza andreiborza changed the title fix(Core): Report well known values in gen_ai.operation.name attribute fix(core): Report well known values in gen_ai.operation.name attribute Jan 23, 2026
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.

Copy link
Member

@nicohrubec nicohrubec left a comment

Choose a reason for hiding this comment

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

thanks for updating, lgtm!

@RulaKhaled RulaKhaled enabled auto-merge (squash) January 23, 2026 16:09
@RulaKhaled RulaKhaled merged commit 2c9def0 into develop Jan 23, 2026
411 of 414 checks passed
@RulaKhaled RulaKhaled deleted the rolaabuhasna/js-1527-report-well-known-values-in-gen_aioperationname-attribute branch January 23, 2026 16:18
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.

3 participants