Skip to content

fix(core): Align Vercel embedding spans with semantic conventions#19795

Open
nicohrubec wants to merge 7 commits intodevelopfrom
nh/fix-vercel-embeddings-tests
Open

fix(core): Align Vercel embedding spans with semantic conventions#19795
nicohrubec wants to merge 7 commits intodevelopfrom
nh/fix-vercel-embeddings-tests

Conversation

@nicohrubec
Copy link
Member

@nicohrubec nicohrubec commented Mar 13, 2026

Embedding calls were incorrectly emitting an invoke_agent span alongside the actual embeddings span. Now we emit a single gen_ai.embeddings span per embed call. Additionally, this fixes some attributes to align with our semantic convention.

Fixes the embeddings tests for Vercel in the testing framework

Closes #19793

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

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 25.64 kB - -
@sentry/browser - with treeshaking flags 24.14 kB - -
@sentry/browser (incl. Tracing) 42.62 kB - -
@sentry/browser (incl. Tracing, Profiling) 47.28 kB - -
@sentry/browser (incl. Tracing, Replay) 81.42 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 71 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 86.12 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 98.37 kB - -
@sentry/browser (incl. Feedback) 42.45 kB - -
@sentry/browser (incl. sendFeedback) 30.31 kB - -
@sentry/browser (incl. FeedbackAsync) 35.36 kB - -
@sentry/browser (incl. Metrics) 26.92 kB - -
@sentry/browser (incl. Logs) 27.07 kB - -
@sentry/browser (incl. Metrics & Logs) 27.74 kB - -
@sentry/react 27.39 kB - -
@sentry/react (incl. Tracing) 44.95 kB - -
@sentry/vue 30.08 kB - -
@sentry/vue (incl. Tracing) 44.48 kB - -
@sentry/svelte 25.66 kB - -
CDN Bundle 28.27 kB - -
CDN Bundle (incl. Tracing) 43.5 kB - -
CDN Bundle (incl. Logs, Metrics) 29.13 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.34 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.2 kB - -
CDN Bundle (incl. Tracing, Replay) 80.32 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81.22 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.76 kB - -
CDN Bundle - uncompressed 82.56 kB - -
CDN Bundle (incl. Tracing) - uncompressed 128.5 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.43 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 131.37 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 209.06 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 245.35 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 248.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 258.26 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 261.11 kB - -
@sentry/nextjs (client) 47.37 kB - -
@sentry/sveltekit (client) 43.07 kB - -
@sentry/node-core 56.34 kB +0.02% +10 B 🔺
@sentry/node 173.23 kB +0.03% +49 B 🔺
@sentry/node - without tracing 96.35 kB +0.01% +5 B 🔺
@sentry/aws-serverless 113.34 kB +0.01% +9 B 🔺

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 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.
⚠️ 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.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 11,435 - 8,753 +31%
GET With Sentry 1,930 17% 1,595 +21%
GET With Sentry (error only) 7,626 67% 5,891 +29%
POST Baseline 1,156 - 1,160 -0%
POST With Sentry 574 50% 525 +9%
POST With Sentry (error only) 1,037 90% 1,012 +2%
MYSQL Baseline 3,872 - 3,169 +22%
MYSQL With Sentry 530 14% 434 +22%
MYSQL With Sentry (error only) 3,191 82% 2,644 +21%

View base workflow run

@nicohrubec nicohrubec changed the title fix Vercel embeddings tests fix(core): Align Vercel embedding spans with semantic conventions Mar 13, 2026
@nicohrubec nicohrubec marked this pull request as ready for review March 13, 2026 10:59
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.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

};

await createRunner().expect({ transaction: expectedTransaction }).start().completed();
});
Copy link

Choose a reason for hiding this comment

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

Test doesn't assert absence of PII when disabled

Low Severity

The test "creates embedding related spans with sendDefaultPii: false" uses expect.objectContaining but never asserts that GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE is absent from span data. The companion sendDefaultPii: true test explicitly checks for the presence of this attribute, implying the false case intends to verify it's not included. Without an explicit assertion of absence (e.g. checking the attribute is undefined), a regression that leaks PII when sendDefaultPii is false would go undetected.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Copy link
Member Author

Choose a reason for hiding this comment

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

this is valid but we don't do this anywhere right now, I opened a follow-up issue to fix this across all our integrations: #19801

@nicohrubec nicohrubec requested a review from andreiborza March 13, 2026 11:04
@nicohrubec nicohrubec requested review from chargome and isaacs March 13, 2026 14:31
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.

Fix vercel embedding tests

2 participants