René's URL Explorer Experiment


Title: Nuxt: share the server-utils nitroIntegration for cache/storage (attempted & reverted — details + how to resume) · Issue #24899 · getsentry/sentry-javascript · GitHub

Open Graph Title: Nuxt: share the server-utils nitroIntegration for cache/storage (attempted & reverted — details + how to resume) · Issue #24899 · getsentry/sentry-javascript

X Title: Nuxt: share the server-utils nitroIntegration for cache/storage (attempted & reverted — details + how to resume) · Issue #24899 · getsentry/sentry-javascript

Description: Follow-up from the nitro → @sentry/server-utils move (#24861). We attempted to have @sentry/nuxt adopt the shared nitroIntegration instead of its own bespoke Nitro instrumentation, but reverted it because it degrades Nuxt's telemetry. Th...

Open Graph Description: Follow-up from the nitro → @sentry/server-utils move (#24861). We attempted to have @sentry/nuxt adopt the shared nitroIntegration instead of its own bespoke Nitro instrumentation, but reverted it ...

X Description: Follow-up from the nitro → @sentry/server-utils move (#24861). We attempted to have @sentry/nuxt adopt the shared nitroIntegration instead of its own bespoke Nitro instrumentation, but reverted it ...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24899

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Nuxt: share the server-utils nitroIntegration for cache/storage (attempted & reverted — details + how to resume)","articleBody":"Follow-up from the nitro → `@sentry/server-utils` move (#24861). We attempted to have `@sentry/nuxt` adopt the shared `nitroIntegration` instead of its own bespoke Nitro instrumentation, but reverted it because it degrades Nuxt's telemetry. This issue records what we did, why it failed, and how to pick it up later.\n\n## Background\n\n#24861 moved Nitro's `node:diagnostics_channel`-based instrumentation into `@sentry/server-utils` as two integrations:\n- `nitroIntegration` — h3/srvx HTTP + middleware spans and unstorage cache spans (subscribes to Nitro's **native** tracing channels).\n- `nitroServerTimingIntegration` — sets `Server-Timing` trace-propagation headers.\n\nNitro's tracing channels (`h3.request`, `srvx.request`, `unstorage.*`) are **opt-in** via the Nitro config `tracingChannel: true`. Only `@sentry/nitro`'s `withSentryConfig` sets it (`packages/nitro/src/config.ts`). **Nuxt never enables it**, so `nitroIntegration` is inert under Nuxt — its channels never fire.\n\n## What we tried (closed PRs #24869, #24880)\n\n1. Enable `tracingChannel: true` in the Nuxt module on Nitro 3 (via a `nitro:config` hook).\n2. Add `nitroIntegration` as an explicit default in the Nuxt server SDK (`addIntegration` after init).\n3. Remove Nuxt's own Nitro-3 storage instrumentation (`storage.server`/`instrumentStorage`) and route-name plugin (`update-route-name.server`), relying on `nitroIntegration` + `route-detector` instead.\n\n## Why it failed\n\nThe original premise was wrong: there was **no double-instrumentation** to fix. Because Nuxt never enabled `tracingChannel`, `nitroIntegration` produced zero spans under Nuxt; Nuxt's own `instrumentStorage` was the only source. Removing it broke storage instrumentation (0 spans).\n\nEnabling `tracingChannel` to fix that turns on the h3/srvx **and** unstorage channels together, so `nitroIntegration` then collides with Nuxt's own, more-tailored instrumentation. The nuxt-5 e2e surfaced three conflict classes — two are genuine **regressions**, not test churn:\n\n**1. Error capture (regression).** `nitroIntegration`'s h3 `captureError` grabs errors first with mechanism `auto.http.nitro.onTraceError`, losing Nuxt's richer capture:\n- Nuxt's `captureErrorHook` produces cause-chained mechanisms (`type: 'chained'`, `exception_id`/`parent_id`/`source`) and `auto.function.nuxt.nitro`.\n- Nuxt filters `HTTPError` 3xx/4xx; the h3 channel does not, so it captures errors Nuxt deliberately handles differently.\n- Failing: `tests/errors.server.test.ts` (3 cases).\n\n**2. Duplicated HTTP/middleware spans.** `nitroIntegration` adds `auto.http.nitro.srvx`/`h3` request + middleware spans on top of Nuxt's existing middleware spans and re-parents the tree (middleware test expected 8 spans, got 14).\n- Failing: `tests/middleware.test.ts` (span count + parent-child), `tests/cache.test.ts` (duplicate-detection test timeout).\n\n**3. Trace-propagation conflict (regression).** `nitroServerTimingIntegration`'s `Server-Timing` headers connect pageload↔server traces in addition to Nuxt's `\u003cmeta>` tags — including on **cached/pre-rendered pages where Nuxt deliberately omits propagation** to avoid stale-trace-bleed. A pre-rendered page that must NOT distribute the trace now does, and pageload `parent_span_id` no longer matches the span Nuxt's meta logic points at.\n- Failing: `tests/tracing.cached-html.test.ts` (4 cases), `tests/tracing.test.ts`.\n\n**Net:** Nuxt's instrumentation is intentionally richer/more careful (cause-chained errors, HTTPError filtering, cache-aware meta-tag propagation). Forcing it onto the generic `nitroIntegration` makes all three worse, for essentially **no upside** — Nuxt's `instrumentStorage` and server-utils' `captureStorageEvents` are near-identical siblings, so the only benefit would be code de-duplication.\n\n## What shipped instead\n\n- Kept #24861 (the move) — it stands on its own for `@sentry/nitro`, node/deno/bun, and Cloudflare Nitro apps, which *do* enable `tracingChannel`.\n- Kept the Cloudflare orchestrion anchor fix (both integrations anchored on `h3`), which is independent of Nuxt.\n- Reverted the Nuxt adoption (#24869, #24880 closed); Nuxt keeps its own instrumentation.\n\n## How to resume this later\n\nAdopting the shared instrumentation under Nuxt is only worthwhile if we can take the **cache/storage** part without dragging in the HTTP/error/propagation behavior. Options, roughly in order of preference:\n\n1. **Isolate the unstorage channel.** Investigate whether Nitro can enable only `unstorage.*` tracing without `h3`/`srvx` (e.g. `tracingChannel: { h3: false, srvx: false }` while unstorage still traces). If so, Nuxt could enable just that and adopt `captureStorageEvents`, leaving its own HTTP/error/propagation untouched. (Needs Nitro-side confirmation — unclear whether unstorage tracing is gated by the same flag.)\n2. **Make `nitroIntegration` sub-behaviors toggleable.** e.g. `nitroIntegration({ http: false, cache: true })` and register `nitroServerTimingIntegration` separately, so a framework that already owns HTTP/error/propagation can opt into cache-only.\n3. **Reconcile the conflicts** if we do want full adoption:\n   - Error: `nitroIntegration`'s h3 `captureError` must not override a framework error hook that owns capture (defer / disable when Nuxt's `captureErrorHook` is present), and must apply the same HTTPError 3xx/4xx filtering.\n   - Spans: avoid double HTTP/middleware spans when the framework already instruments them.\n   - Propagation: `Server-Timing` must respect Nuxt's cache-aware propagation (no headers on cached/pre-rendered pages) so it doesn't reintroduce stale-trace-bleed.\n\nGiven the low upside (near-identical code) and high reconciliation cost, this is probably only worth doing if option 1 (unstorage isolation) turns out to be clean.\n\n### Reproduction / references\n- Move PR: #24861\n- Reverted attempt: #24869 (storage strip + `tracingChannel` + Nuxt `nitroIntegration` default), #24880 (route-name strip)\n- e2e: `dev-packages/e2e-tests/test-applications/nuxt-5` (`cache`, `storage`, `errors.server`, `middleware`, `tracing`, `tracing.cached-html`)\n- Relevant code: `packages/nuxt/src/module.ts`, `packages/nuxt/src/server/sdk.ts`, `packages/nuxt/src/runtime/utils/instrumentStorage.ts`, `packages/nuxt/src/runtime/hooks/captureErrorHook.ts`, `packages/server-utils/src/integrations/nitro/*`, `packages/nitro/src/config.ts`","author":{"url":"https://github.com/mydea","@type":"Person","name":"mydea"},"datePublished":"2026-09-30T14:43:41Z","url":"https://github.com/getsentry/sentry-javascript/issues/24899"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5ef824f5-4fc5-40f6-cba5-996774637060
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9FD4:3488ED:84379C:B94057:6B0426A5
html-safe-nonce6becaf9f3b7ecda33a2a1217c69e45cecc8251c10f0f43d6d0de6c4bc549c04e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkQ0OjM0ODhFRDo4NDM3OUM6Qjk0MDU3OjZCMDQyNkE1IiwidmlzaXRvcl9pZCI6IjU5Nzc3MTYwMjM4NzE0MTU5NzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca107f02c707d8959e9ae96bddb05b30f9c67e585d380036f9e1ddb00879f92f5
hovercard-subject-tagissue:5648278963
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/24899/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a8dda23bf7a41299300225b26d1655db61c939ac238893c495179802dd90232e/getsentry/sentry-javascript/issues/24899
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a8dda23bf7a41299300225b26d1655db61c939ac238893c495179802dd90232e/getsentry/sentry-javascript/issues/24899
og:image:altFollow-up from the nitro → @sentry/server-utils move (#24861). We attempted to have @sentry/nuxt adopt the shared nitroIntegration instead of its own bespoke Nitro instrumentation, but reverted it ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemydea
hostnamegithub.com
expected-hostnamegithub.com
Nonef8d9f404447ab5df341c8a92cf5fc927730ad1321e64ac57656444d2438097f1
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef7edccce04851591ee529948701779ce6819bc53
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/24899#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F24899
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F24899
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/24899
Reloadhttps://github.com/getsentry/sentry-javascript/issues/24899
Reloadhttps://github.com/getsentry/sentry-javascript/issues/24899
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests59 (59)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/24899
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/24899
Nuxt: share the server-utils nitroIntegration for cache/storage (attempted & reverted — details + how to resume)https://github.com/getsentry/sentry-javascript/issues/24899#top
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
Nuxthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Nuxt%22
https://github.com/mydea
mydeahttps://github.com/mydea
on Sep 30, 2026https://github.com/getsentry/sentry-javascript/issues/24899#issue-5648278963
#24861https://github.com/getsentry/sentry-javascript/pull/24861
#24861https://github.com/getsentry/sentry-javascript/pull/24861
#24869https://github.com/getsentry/sentry-javascript/pull/24869
#24880https://github.com/getsentry/sentry-javascript/pull/24880
ref(nitro): Move channel-based instrumentation into @sentry/server-utils #24861https://github.com/getsentry/sentry-javascript/pull/24861
fix(nuxt): Stop double-instrumenting storage on Nitro 3 #24869https://github.com/getsentry/sentry-javascript/pull/24869
fix(nuxt): Remove redundant Nitro 3 route-name plugin #24880https://github.com/getsentry/sentry-javascript/pull/24880
ref(nitro): Move channel-based instrumentation into @sentry/server-utils #24861https://github.com/getsentry/sentry-javascript/pull/24861
fix(nuxt): Stop double-instrumenting storage on Nitro 3 #24869https://github.com/getsentry/sentry-javascript/pull/24869
fix(nuxt): Remove redundant Nitro 3 route-name plugin #24880https://github.com/getsentry/sentry-javascript/pull/24880
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Sep 30, 2026https://github.com/getsentry/sentry-javascript/issues/24899#issuecomment-5913600378
Linear Codehttps://linear.app
JS-3857https://linear.app/getsentry/issue/JS-3857
linear-codehttps://github.com/apps/linear-code
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
Nuxthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Nuxt%22
on Sep 30, 2026https://github.com/getsentry/sentry-javascript/issues/24899#event-32174919695
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/24899
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/24899
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
Nuxthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Nuxt%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.