Title: Client decision rule for trace meta tags under cacheComponents · Issue #24944 · getsentry/sentry-javascript · GitHub
Open Graph Title: Client decision rule for trace meta tags under cacheComponents · Issue #24944 · getsentry/sentry-javascript
X Title: Client decision rule for trace meta tags under cacheComponents · Issue #24944 · getsentry/sentry-javascript
Description: The server tells the browser which trace it belongs to through a tag. Under cacheComponents the shell of a document is prerendered and cached, so a tag baked into it would be replayed to every later visitor. Un...
Open Graph Description: The server tells the browser which trace it belongs to through a tag. Under cacheComponents the shell of a document is prerendered and cached, so a tag baked into it woul...
X Description: The server tells the browser which trace it belongs to through a <meta name="sentry-trace"> tag. Under cacheComponents the shell of a document is prerendered and cached, so a tag ba...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24944
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Client decision rule for trace meta tags under cacheComponents","articleBody":"The server tells the browser which trace it belongs to through a `\u003cmeta name=\"sentry-trace\">` tag. Under `cacheComponents` the shell of a document is prerendered and cached, so a tag baked into it would be replayed to every later visitor. Until now the SDK avoided that by not emitting tags at all, so pageloads and server requests were never connected.\n\n**Changes**\n\n* Server: a Next.js-aware propagator (`NextSentryPropagator`) hands out no `sentry-trace`/`baggage` while a `prerender route (app)` span is active. A prerendered shell, at build time or at request time, never carries a trace. Next.js computes the tags inside that span for prerenders and outside of it for request renders, including the resume of a shell. Verified for Next.js 15.0 through 16.3.\n* Config: `experimental.clientTraceMetadata` is enabled again under `cacheComponents`.\n* Client: any tag in the document is continued, the last one wins. Blocking pages (`export const instant = false`) and dev mode join the server trace right away, no special case.\n* Client: when no tag and no `Server-Timing` trace are present and the document is still streaming, the pageload span waits for the resumed part, bounded by `DOMContentLoaded` and a 10 s cap, then continues the server trace. Start timestamp stays at the time origin, children come from the performance timeline, so the span looks the same as before.\n* Client: a navigation during that wait starts the pageload with a fresh trace before the navigation span is created, so it becomes the pageload's redirect child instead of the only record of the visit.\n* Removed: the `generateStaticParams` based meta tag removal (`removeIsrSsgTraceMetaTags`) and the `isrRoutes` manifest field. ISR shells are prerenders, so the server guard covers them, including `revalidate` routes without `generateStaticParams`.\n\n**Not done, deliberately**\n\n* No `cache_origin` links from meta tags. Shells are trace-free, so a visitor of a cached shell starts a fresh trace with nothing to link. The `use cache` instrumentation keeps its own `cache_origin` links.\n* Fetches and errors between SDK start and the arrival of the resumed part are not attached to the pageload. That window is the dynamic hole's render time, longer on Vercel where the CDN serves the shell before the function starts. The Server-Timing sub-issues close it.\n\n**Verified**\n\n* Unit tests in `packages/nextjs`.\n* E2E in both cacheComponents apps, production and development: `/pageload-tracing` joined, `/blocking` joined, two visitors of a shell generated at request time never share a trace and carry no links, fully static page starts fresh.\n* E2E `nextjs-16` including the ISR pages, which now rely on the server guard.\n* Real telemetry from a demo app: every `/pageload-tracing` and `/blocking` pageload shares a trace with its server request, no trace holds two pageloads.","author":{"url":"https://github.com/chargome","@type":"Person","name":"chargome"},"datePublished":"2026-10-01T13:29:06Z","url":"https://github.com/getsentry/sentry-javascript/issues/24944"}
| 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:d614d8fd-ebf2-2846-37ac-d743f949d5fc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C020:2FFC62:4D12F9:6B7037:6B0414A8 |
| html-safe-nonce | b438dbe0f73f32099c540cb6ab5a474ed1e754715854ac5ffd25c4ce1bbbaab7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDIwOjJGRkM2Mjo0RDEyRjk6NkI3MDM3OjZCMDQxNEE4IiwidmlzaXRvcl9pZCI6IjU4MDY3Njk4NjU4NTk3OTgxODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 014d774a73c44014456e904f0f358eb8892c75fe254a9cb1a07c3b6f784cd228 |
| hovercard-subject-tag | issue:5662948366 |
| 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/24944/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7d0df1ab27d335680633e9910662d358061fc4ba81904f461b8787657dad9081/getsentry/sentry-javascript/issues/24944 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7d0df1ab27d335680633e9910662d358061fc4ba81904f461b8787657dad9081/getsentry/sentry-javascript/issues/24944 |
| og:image:alt | The server tells the browser which trace it belongs to through a tag. Under cacheComponents the shell of a document is prerendered and cached, so a tag baked into it woul... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chargome |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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