GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(nuxt): Remove redundant Nitro 3 route-name plugin by mydea · Pull Request #24880 · getsentry/sentry-javascript

Conversation

@mydea

@mydea mydea commented Sep 30, 2026

Copy link
Copy Markdown
Member

Stacked on #24869.

On Nitro 3, @sentry/server-utils' nitroIntegration — auto-injected via @sentry/node's default integrations — already sets the parametrized route name (setHttpServerSpanRouteAttribute) and the url.path.parameter.* / params.* attributes for API routes, and route-detector.server handles SSR page routes (the /** catch-all case nitroIntegration skips). Nuxt's update-route-name.server set the exact same attributes on the same span.

Unlike the storage duplication (#24869), this produced no duplicate spans — just redundant, idempotent attribute writes — so there's no behavior change, only a cleanup. The v3 update-route-name.server plugin is removed; the shared updateRouteBeforeResponse hook stays (still used by the legacy Nitro 2 plugin and the Cloudflare plugin), and legacy Nitro keeps its own route-name plugin.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mydea
mydea added this pull request to stack #24871 September 30, 2026 11:08
@github-actions

github-actions Bot commented Sep 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.24 kB - -
@sentry/browser - with treeshaking flags 27.5 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.4 kB - -
@sentry/browser (incl. Tracing) 51.15 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.18 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.18 kB - -
@sentry/browser (incl. Tracing, Replay) 90.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 95.46 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 108.41 kB - -
@sentry/browser (incl. Feedback) 46.76 kB - -
@sentry/browser (incl. sendFeedback) 34.3 kB - -
@sentry/browser (incl. FeedbackAsync) 39.41 kB - -
@sentry/browser (incl. Metrics) 30.25 kB - -
@sentry/browser (incl. Logs) 30.53 kB - -
@sentry/browser (incl. Metrics & Logs) 31.2 kB - -
@sentry/react 31.08 kB - -
@sentry/react (incl. Tracing) 53.54 kB - -
@sentry/vue 36.78 kB - -
@sentry/vue (incl. Tracing) 53.74 kB - -
@sentry/svelte 29.26 kB - -
CDN Bundle 31.05 kB - -
CDN Bundle (incl. Tracing) 51.8 kB - -
CDN Bundle (incl. Logs, Metrics) 33.31 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.77 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.02 kB - -
CDN Bundle (incl. Tracing, Replay) 89.39 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.36 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 95.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.53 kB - -
CDN Bundle - uncompressed 91.7 kB - -
CDN Bundle (incl. Tracing) - uncompressed 154.08 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 98.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 160.04 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.84 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.81 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.75 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.51 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.44 kB - -
@sentry/nextjs (client) 55.78 kB - -
@sentry/sveltekit (client) 51.6 kB - -
@sentry/core/server 39.99 kB - -
@sentry/core/browser 13.63 kB - -
@sentry/node 145.69 kB +1.16% +1.67 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.01 kB +0.04% +30 B 🔺
@sentry/node - without tracing 93.18 kB +0.31% +283 B 🔺
@sentry/node - without channel injection 124.08 kB +1.38% +1.69 kB 🔺
@sentry/aws-serverless 101.46 kB +0.28% +282 B 🔺
@sentry/cloudflare (withSentry) - minified 206.69 kB - -
@sentry/cloudflare (withSentry) 514.13 kB - -

View base workflow run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mydea
mydea force-pushed the feat/nuxt-strip-duplicate-nitro-instrumentation branch from 9891641 to f882315 Compare September 30, 2026 11:32
@mydea
mydea force-pushed the feat/nuxt-strip-update-route-name branch 2 times, most recently from fb27207 to f4bd6ae Compare September 30, 2026 11:58
@mydea
mydea force-pushed the feat/nuxt-strip-duplicate-nitro-instrumentation branch from 874455e to 9cfef61 Compare September 30, 2026 12:26
@mydea
mydea force-pushed the feat/nuxt-strip-update-route-name branch from f4bd6ae to 2a97f05 Compare September 30, 2026 12:26
@mydea
mydea marked this pull request as ready for review September 30, 2026 12:30
@mydea
mydea requested a review from a team as a code owner September 30, 2026 12:30
@mydea
mydea requested review from nicohrubec and s1gr1d and removed request for a team September 30, 2026 12:30
sentry[bot]
sentry Bot reviewed Sep 30, 2026
View reviewed changes
Comment thread packages/nuxt/src/module.ts
Comment on lines 112 to 121

if (isNitroV3) {
addServerPlugin(moduleDirResolver.resolve('./runtime/plugins/handler.server'));
addServerPlugin(moduleDirResolver.resolve('./runtime/plugins/update-route-name.server'));
// On Nitro 3, the parametrized route name and `url.path.parameter.*` attributes are set by
// `@sentry/server-utils`' `nitroIntegration` (auto-injected via `@sentry/node` defaults) for
// API routes, and by `route-detector.server` for SSR page routes, so no Nuxt route-name
// plugin is needed. Legacy Nitro (v2) has no such channels and keeps its own.
} else {
addServerPlugin(moduleDirResolver.resolve('./runtime/plugins/handler-legacy.server'));
addServerPlugin(moduleDirResolver.resolve('./runtime/plugins/update-route-name-legacy.server'));

@sentry sentry Bot Sep 30, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Removing update-route-name.server results in generic API route transaction names when tracing is disabled, as the replacement nitroIntegration is only active with tracing.
Severity: MEDIUM

Suggested Fix

The update-route-name.server plugin should be retained to ensure API route names are correctly parameterized for all users, including those who do not have performance tracing enabled. This guarantees consistent behavior regardless of the user's tracing configuration.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: packages/nuxt/src/module.ts#L112-L121

Potential issue: The pull request removes the `update-route-name.server` Nitro plugin,
assuming that the `nitroIntegration` will handle API route naming. However, the
`nitroIntegration` is only added to default integrations when tracing is enabled (e.g.,
`tracesSampleRate` is set). For users who only use Sentry for error tracking without
tracing, or who set `defaultIntegrations: false`, this change will cause Nitro API
routes to have generic, unparameterized transaction names. The removed plugin was the
sole mechanism ensuring correct route naming in these common configurations.

Did we get this right? 👍 / 👎 to inform future reviews.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mydea mydea mentioned this pull request Sep 30, 2026
fix(nitro): Anchor both nitro integrations on h3 for Cloudflare auto-injection #24897
Closed
@mydea
mydea marked this pull request as draft September 30, 2026 14:06
@mydea @claude
fix(nuxt): Remove redundant Nitro 3 route-name plugin
01d3ad1
On Nitro 3, `@sentry/server-utils`' `nitroIntegration` (auto-injected via
`@sentry/node`'s defaults) already sets the parametrized route name and
`url.path.parameter.*` attributes for API routes, and `route-detector.server`
handles SSR page routes. Nuxt's `update-route-name.server` set the same
attributes on the same span — redundant work with no extra telemetry — so it is
removed for Nitro 3. Legacy Nitro (v2), which has no native tracing channels,
keeps its own plugin, and the shared `updateRouteBeforeResponse` hook stays for
the legacy and Cloudflare paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@mydea
mydea force-pushed the feat/nuxt-strip-duplicate-nitro-instrumentation branch from 9cfef61 to b515709 Compare September 30, 2026 14:13
@mydea
mydea force-pushed the feat/nuxt-strip-update-route-name branch from 2a97f05 to 01d3ad1 Compare September 30, 2026 14:13
@mydea

mydea commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

actually, this fails on nuxt 5, so closing this pr

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mydea mydea closed this Sep 30, 2026
@mydea mydea mentioned this pull request Sep 30, 2026
Nuxt: share the server-utils nitroIntegration for cache/storage (attempted & reverted — details + how to resume) #24899
Open
@mydea
mydea removed this pull request from stack #24871 October 1, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sentry sentry[bot] sentry[bot] left review comments
@nicohrubec nicohrubec Awaiting requested review from nicohrubec nicohrubec is a code owner automatically assigned from getsentry/team-javascript-sdks-framework
@s1gr1d s1gr1d Awaiting requested review from s1gr1d s1gr1d is a code owner automatically assigned from getsentry/team-javascript-sdks-framework

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@mydea
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.