Title: feat(ai): Auto-populate `gen_ai.conversation.id` where the framework carries one, document the rest · Issue #24832 · getsentry/sentry-javascript · GitHub
Open Graph Title: feat(ai): Auto-populate `gen_ai.conversation.id` where the framework carries one, document the rest · Issue #24832 · getsentry/sentry-javascript
X Title: feat(ai): Auto-populate `gen_ai.conversation.id` where the framework carries one, document the rest · Issue #24832 · getsentry/sentry-javascript
Description: Problem Users expect the Agents "Conversations" view to work out of the box, but only OpenAI, Mastra, Flue, Cloudflare Agents and eve fill gen_ai.conversation.id without the user calling Sentry.setConversationId(). The rest depend on the...
Open Graph Description: Problem Users expect the Agents "Conversations" view to work out of the box, but only OpenAI, Mastra, Flue, Cloudflare Agents and eve fill gen_ai.conversation.id without the user calling Sentry.set...
X Description: Problem Users expect the Agents "Conversations" view to work out of the box, but only OpenAI, Mastra, Flue, Cloudflare Agents and eve fill gen_ai.conversation.id without the user calling ...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24832
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(ai): Auto-populate `gen_ai.conversation.id` where the framework carries one, document the rest","articleBody":"### Problem\n\nUsers expect the Agents \"Conversations\" view to work out of the box, but only OpenAI, Mastra, Flue, Cloudflare Agents and eve fill `gen_ai.conversation.id` without the user calling `Sentry.setConversationId()`. The rest depend on the user knowing that API exists.\n\nLooking at what each remaining provider exposes, the integrations split into two groups.\n\n**Group A: no id to read.** Anthropic, Mistral, Google GenAI, Groq, Together AI, the OpenAI-compatible integration, and Workers AI all wrap stateless completion calls. Anthropic exposes only `metadata.user_id` (a user, not a conversation) and a per-response `msg_...` id. The others have nothing comparable. Auto-population is not possible for these, and the docs for each should say so and point to `setConversationId()`.\n\n**Group B: an id exists but was not propagated to every span.**\n\n- LangChain and LangGraph. LangGraph read `config.configurable.thread_id` but set it only on the `invoke_agent` span, and plain LangChain never read `thread_id`, `session_id` or `sessionId` at all. Both are addressed in #24831, which reads the id from run metadata in the callback handler so every chat, chain and tool span carries it.\n\n**Related but separate:** Vercel AI fills the attribute with `providerMetadata.openai.responseId`, which is a per-call response id, not a conversation id. It groups nothing across turns and is only present for the OpenAI and Azure providers. It should be removed, or moved so the attribute is not misleading. Worth its own issue.\n\n### Acceptance\n\n- #24831 merged.\n- Each Group A integration's docs page has a \"Conversations\" note pointing to `setConversationId()`.\n- Decision recorded on the Vercel AI response-id fallback.\n- The direct OpenAI integration stops using `previous_response_id` as `gen_ai.conversation.id` (`extractConversationId` in `packages/server-utils/src/ai/openai/utils.ts`). That id changes every turn, and the same chain gets a different id than it does through Vercel AI after #24979, which reads only the `conversation` option.\n","author":{"url":"https://github.com/RulaKhaled","@type":"Person","name":"RulaKhaled"},"datePublished":"2026-09-29T14:07:50Z","url":"https://github.com/getsentry/sentry-javascript/issues/24832"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cde05feb-3fb7-146a-8191-3ffed481fa2c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9974:2E09E3:3C7E82:548390:6B042721 |
| html-safe-nonce | 14e7ae4c647dcaf22e0d2d66895b7a77f9fa8e86e9e78c98b1aa487e6ed5fa6b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTc0OjJFMDlFMzozQzdFODI6NTQ4MzkwOjZCMDQyNzIxIiwidmlzaXRvcl9pZCI6IjU0NTcwNjUzNTY1MTI0NzA4MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a9c44f29fe25308e6b254211afed9a9af1464478f3376ffd41cf92c835b1b796 |
| hovercard-subject-tag | issue:5631879386 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/24832/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d8dfb435c2698fc7160e3504c15cb23becd688d1a187618136d1153234bdee61/getsentry/sentry-javascript/issues/24832 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d8dfb435c2698fc7160e3504c15cb23becd688d1a187618136d1153234bdee61/getsentry/sentry-javascript/issues/24832 |
| og:image:alt | Problem Users expect the Agents "Conversations" view to work out of the box, but only OpenAI, Mastra, Flue, Cloudflare Agents and eve fill gen_ai.conversation.id without the user calling Sentry.set... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RulaKhaled |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width