feat(core): Introduces a new Sentry.setConversationId() API to track multi turn AI conversations across API calls. (#18909)
You can now set a conversation ID that will be automatically applied to spans within that scope. This allows you to link traces from the same conversation together.
import * as Sentry from '@sentry/node';
// Set conversation ID for all subsequent spans
Sentry.setConversationId('conv_abc123');
// All AI spans will now include the gen_ai.conversation.id attribute
await openai.chat.completions.create({...});
This is particularly useful for tracking multiple AI API calls that are part of the same conversation, allowing you to analyze entire conversation flows in Sentry.
The conversation ID is stored on the isolation scope and automatically applied to spans via the new conversationIdIntegration.
feat(tanstackstart-react): Auto-instrument global middleware in sentryTanstackStart Vite plugin (#18844)
The sentryTanstackStart Vite plugin now automatically instruments requestMiddleware and functionMiddleware arrays in createStart(). This captures performance data without requiring manual wrapping.
Auto-instrumentation is enabled by default. To disable it:
// vite.config.ts
sentryTanstackStart({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: 'your-org',
project: 'your-project',
autoInstrumentMiddleware: false,
});
invalid (#18901)AbortError by default on unhandled rejection (#18973)platform to envelope item header (#18954)gen_ai.input.messages.original_length to sentry.sdk_meta.gen_ai.input.messages.original_length (#18970)gen_ai.request.messages to gen_ai.input.messages (#18944)Work in this release was contributed by @sebws, @harshit078, and @fedetorre. Thank you for your contributions!
| Path | Size |
|---|---|
| @sentry/browser | 24.73 KB |
| @sentry/browser - with treeshaking flags | 23.27 KB |
| @sentry/browser (incl. Tracing) | 41.15 KB |
| @sentry/browser (incl. Tracing, Profiling) | 45.68 KB |
| @sentry/browser (incl. Tracing, Replay) | 78.86 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 68.75 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 83.46 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 95.36 KB |
| @sentry/browser (incl. Feedback) | 41.06 KB |
| @sentry/browser (incl. sendFeedback) | 29.31 KB |
| @sentry/browser (incl. FeedbackAsync) | 34.19 KB |
| @sentry/browser (incl. Metrics) | 25.81 KB |
| @sentry/browser (incl. Logs) | 25.95 KB |
| @sentry/browser (incl. Metrics & Logs) | 26.6 KB |
| @sentry/react | 26.42 KB |
| @sentry/react (incl. Tracing) | 43.33 KB |
| @sentry/vue | 29.07 KB |
| @sentry/vue (incl. Tracing) | 42.9 KB |
| @sentry/svelte | 24.74 KB |
| CDN Bundle | 27.24 KB |
| CDN Bundle (incl. Tracing) | 41.93 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) | 42.73 KB |
| CDN Bundle (incl. Tracing, Replay) | 77.82 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) | 83.12 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) | 84.01 KB |
| CDN Bundle - uncompressed | 79.69 KB |
| CDN Bundle (incl. Tracing) - uncompressed | 124.16 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed | 126.93 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed | 238.03 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 250.53 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed | 253.28 KB |
| @sentry/nextjs (client) | 45.63 KB |
| @sentry/sveltekit (client) | 41.51 KB |
| @sentry/node-core | 50.8 KB |
| @sentry/node | 162.16 KB |
| @sentry/node - without tracing | 91.59 KB |
| @sentry/aws-serverless | 106.74 KB |
Fetched March 31, 2026