Skip to content

fix(v9/node): Ensure tool errors for vercelAiIntegration have correct trace #17142

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 24, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jul 24, 2025

Backport of #17132

Fixes #17108

…trace connected (#17132)

This fixes the problem that for tool errors triggered from vercel-ai
integration, traces were not connected.
This seemed to happen because errors bubble up to the global unhandled
rejection handler, where the span is no longer active and thus the trace
cannot be connected.

This PR fixes this by attaching the active span to the error and using
this in the unhandled rejection handler, if it exists.

Closes #17108
@mydea mydea self-assigned this Jul 24, 2025
@mydea mydea enabled auto-merge (squash) July 24, 2025 09:31
Copy link
Contributor

github-actions bot commented Jul 24, 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.79 kB - -
@sentry/browser - with treeshaking flags 22.35 kB - -
@sentry/browser (incl. Tracing) 39.66 kB - -
@sentry/browser (incl. Tracing, Replay) 77.79 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.59 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.5 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 94.59 kB - -
@sentry/browser (incl. Feedback) 40.48 kB - -
@sentry/browser (incl. sendFeedback) 28.48 kB - -
@sentry/browser (incl. FeedbackAsync) 33.37 kB - -
@sentry/react 25.55 kB - -
@sentry/react (incl. Tracing) 41.62 kB - -
@sentry/vue 28.24 kB - -
@sentry/vue (incl. Tracing) 41.45 kB - -
@sentry/svelte 23.81 kB - -
CDN Bundle 25.18 kB - -
CDN Bundle (incl. Tracing) 39.42 kB - -
CDN Bundle (incl. Tracing, Replay) 75.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 80.89 kB - -
CDN Bundle - uncompressed 73.45 kB - -
CDN Bundle (incl. Tracing) - uncompressed 116.86 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 231 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 243.81 kB - -
@sentry/nextjs (client) 43.66 kB - -
@sentry/sveltekit (client) 40.08 kB - -
@sentry/node 169.12 kB +0.1% +165 B 🔺
@sentry/node - without tracing 100.31 kB +0.1% +91 B 🔺
@sentry/aws-serverless 128.47 kB +0.07% +83 B 🔺

View base workflow run

@AbhiPrasad
Copy link
Member

updated the branch because we merged in remix integration test flake fixes as part of #17144

@mydea mydea merged commit 0144544 into v9 Jul 24, 2025
289 of 293 checks passed
@mydea mydea deleted the fn/v9-backport-vercel-ai branch July 24, 2025 10:22
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