Skip to content

feat(core): Prepend vercel ai attributes with vercel.ai.X #16908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2025

Conversation

AbhiPrasad
Copy link
Member

resolves https://linear.app/getsentry/issue/JS-663

Categorizing the attributes this way helps us differentiate between the ai attributes added by vercel compared to the otel semantic conventions.

@AbhiPrasad AbhiPrasad requested a review from a team July 10, 2025 18:09
@AbhiPrasad AbhiPrasad self-assigned this Jul 10, 2025
@AbhiPrasad AbhiPrasad requested review from Lms24 and andreiborza and removed request for a team July 10, 2025 18:09
Copy link
Contributor

github-actions bot commented Jul 10, 2025

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 23.88 kB - -
@sentry/browser - with treeshaking flags 22.35 kB - -
@sentry/browser (incl. Tracing) 39.75 kB - -
@sentry/browser (incl. Tracing, Replay) 77.88 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.7 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.57 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 94.68 kB - -
@sentry/browser (incl. Feedback) 40.56 kB - -
@sentry/browser (incl. sendFeedback) 28.56 kB - -
@sentry/browser (incl. FeedbackAsync) 33.46 kB - -
@sentry/react 25.61 kB - -
@sentry/react (incl. Tracing) 41.7 kB - -
@sentry/vue 28.31 kB - -
@sentry/vue (incl. Tracing) 41.54 kB - -
@sentry/svelte 23.9 kB - -
CDN Bundle 25.16 kB - -
CDN Bundle (incl. Tracing) 39.41 kB - -
CDN Bundle (incl. Tracing, Replay) 75.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 80.87 kB - -
CDN Bundle - uncompressed 73.5 kB - -
CDN Bundle (incl. Tracing) - uncompressed 116.89 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.06 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 243.88 kB - -
@sentry/nextjs (client) 43.34 kB - -
@sentry/sveltekit (client) 40.2 kB - -
@sentry/node 167.6 kB +0.02% +25 B 🔺
@sentry/node - without tracing 100.3 kB - -
@sentry/aws-serverless 128.41 kB - -

View base workflow run

@AbhiPrasad AbhiPrasad force-pushed the abhi-rename-vercel-ai branch from e18b503 to d794cfb Compare July 10, 2025 19:07
// Change attributes namespaced with `ai.X` to `vercel.ai.X`
for (const key of Object.keys(attributes)) {
if (key.startsWith('ai.')) {
renameAttributeKey(attributes, key, `vercel.ai.${key.slice(3)}`);
Copy link
Member

Choose a reason for hiding this comment

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

l: instead of slicing, can we just preprend vercel.${key}?

@AbhiPrasad AbhiPrasad merged commit 101b4f2 into develop Jul 11, 2025
167 of 168 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-rename-vercel-ai branch July 11, 2025 15:24
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