Skip to content

ref(core): Use @sentry/conventions for gen_ai attributes#22552

Open
nicohrubec wants to merge 3 commits into
developfrom
feat/migrate-ai-attributes-to-conventions
Open

ref(core): Use @sentry/conventions for gen_ai attributes#22552
nicohrubec wants to merge 3 commits into
developfrom
feat/migrate-ai-attributes-to-conventions

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Jul 23, 2026

Copy link
Copy Markdown
Member

Replace the gen_ai attributes that we currently maintain in a local constants file with @sentry/conventions. For now just doing 1:1 replacements, so no breaking changes. For the remaining attributes in the file we can either remove or adjust/update them based on the sentry conventions. Also we are still using some deprecated attributes from sentry conventions that we should adjust as part of the major.

nicohrubec and others added 3 commits July 23, 2026 14:17
Migrate all AI integrations to import gen_ai attribute keys from
`@sentry/conventions/attributes` where an equivalent exists, shrinking
`gen-ai-attributes.ts` to only the constants conventions does not cover.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tributes-to-conventions

# Conflicts:
#	packages/core/src/shared-exports.ts
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 27.79 kB +0.02% +3 B 🔺
@sentry/browser - with treeshaking flags 26.23 kB - -
@sentry/browser (incl. Tracing) 46.31 kB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.08 kB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.12 kB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing, Replay) 85.59 kB +0.01% +6 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.23 kB +0.01% +5 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 90.29 kB +0.01% +6 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 102.97 kB +0.01% +6 B 🔺
@sentry/browser (incl. Feedback) 44.96 kB +0.01% +4 B 🔺
@sentry/browser (incl. sendFeedback) 32.59 kB +0.02% +5 B 🔺
@sentry/browser (incl. FeedbackAsync) 37.64 kB +0.02% +6 B 🔺
@sentry/browser (incl. Metrics) 28.88 kB +0.02% +3 B 🔺
@sentry/browser (incl. Logs) 29.11 kB +0.02% +3 B 🔺
@sentry/browser (incl. Metrics & Logs) 29.8 kB +0.02% +3 B 🔺
@sentry/react 29.59 kB +0.02% +3 B 🔺
@sentry/react (incl. Tracing) 48.6 kB +0.02% +5 B 🔺
@sentry/vue 33.22 kB +0.01% +2 B 🔺
@sentry/vue (incl. Tracing) 48.28 kB +0.03% +10 B 🔺
@sentry/svelte 27.81 kB +0.02% +4 B 🔺
CDN Bundle 30.11 kB +0.01% +3 B 🔺
CDN Bundle (incl. Tracing) 48.16 kB -0.02% -5 B 🔽
CDN Bundle (incl. Logs, Metrics) 31.69 kB +0.01% +3 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 49.48 kB +0.01% +1 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 70.95 kB +0.01% +5 B 🔺
CDN Bundle (incl. Tracing, Replay) 85.73 kB +0.01% +4 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.02 kB -0.01% -2 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 91.5 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.79 kB +0.01% +4 B 🔺
CDN Bundle - uncompressed 89.77 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 144.87 kB +0.02% +19 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.48 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.85 kB +0.02% +19 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.24 kB +0.01% +20 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.11 kB +0.01% +19 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.07 kB +0.01% +19 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.81 kB +0.01% +19 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.76 kB +0.01% +19 B 🔺
@sentry/nextjs (client) 51.13 kB +0.02% +6 B 🔺
@sentry/sveltekit (client) 46.75 kB +0.02% +8 B 🔺
@sentry/core/server 80.03 kB -0.21% -162 B 🔽
@sentry/core/browser 51.99 kB -0.02% -6 B 🔽
@sentry/node 124.47 kB -0.13% -156 B 🔽
@sentry/node (incl. diagnostics channel injection) 149.94 kB -0.08% -111 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB - -
@sentry/node - without tracing 74.77 kB +0.01% +5 B 🔺
@sentry/aws-serverless 84.26 kB +0.01% +2 B 🔺
@sentry/cloudflare (withSentry) - minified 196.64 kB - -
@sentry/cloudflare (withSentry) 483.02 kB -0.18% -853 B 🔽

View base workflow run

@nicohrubec
nicohrubec marked this pull request as ready for review July 23, 2026 13:10
@nicohrubec
nicohrubec requested review from a team as code owners July 23, 2026 13:10
@nicohrubec
nicohrubec requested review from andreiborza and isaacs and removed request for a team July 23, 2026 13:10
Comment thread packages/core/src/server-exports.ts

@logaretm logaretm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My scrollbar died 10/10 👍

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