Repository navigation
feat(nuxt): Add render span integration for Nuxt tracing channels - #26942
Merged
Merged
Conversation
Contributor
size-limit report 📦Compared: 3a8b562 (PR test merge using develop at a4de76d) Against: a4de76d (develop) · base run #68404 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 13 successful. See the run.
Successful checks
|
s1gr1d
marked this pull request as ready for review
November 27, 2026 12:40
javascript-sdk-gitflow
Bot
requested review from
chargome,
isaacs and
nicohrubec
November 27, 2026 12:40
chargome
approved these changes
Nov 27, 2026
|
|
||
| // The `http.server` span of the runtime SDK stays the request root, not a `nuxt.request` or `srvx.request` span. | ||
| // It also exists without these channels, and it already has the HTTP data and the incoming trace. | ||
| bindTracingChannelToSpan(diagnosticsTracingChannel<NuxtRenderPayload>('nuxt.render'), startRenderSpan, { |
Member
There was a problem hiding this comment.
nit: with experimental.ssrStreaming on, renderStreamedResponse() resolves after the first chunk, so renderPage only covers the shell and misses later errors. Fine to handle in a follow-up, maybe just skip streaming: true for now?
A new server integration makes a `renderPage` or `renderErrorPage` span for each page render, as a child of the `http.server` root span. The spans come from the `nuxt.render` tracing channel of Nuxt. Nuxt publishes the channel only when the app turns on the `nuxt` group of its `tracingChannel` option, so nothing changes by default.
With `experimental.ssrStreaming`, Nuxt resolves the render at the first chunk. The span would end at the shell and miss later errors, so the integration makes no span for a streamed render for now.
s1gr1d
force-pushed
the
sig/nuxt-render-span-integration
branch
from
December 1, 2026 08:42
693af9b to
a3ec6e0
Compare
s1gr1d
added a commit
that referenced
this pull request
Dec 1, 2026
## What On Nuxt >= 4.7, the module now turns on the `nuxt` group of Nuxt's `tracingChannel` option when it also sets up the server SDK. With the integration from #26942, each page render on the server then has a `renderPage` or `renderErrorPage` span. - A `tracingChannel` value in the Nuxt config of the app wins, also when it comes from a layer. - The Nitro groups (`srvx`, `h3`, `unstorage`, `db0`) stay off by default. - The E2E tests for the render spans in `nuxt-4` and `nuxt-5` are in this PR. ## Why The integration from #26942 makes no span until the option is on. The module turns it on, so users get the render spans without a config change. The SDK's own instrumentation stays the span source wherever it exists, because it also works on Nitro v2, which has no channels. So the rest of the span tree does not change. One change for apps that set a partial object such as `tracingChannel: { nuxt: true }` on Nitro v3: the Nitro groups are now off unless the object turns them on. Before, Nitro turned them on. Stacked on #26942.
52 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
A new server integration in
@sentry/nuxtmakes arenderPagespan for each page render on the server, under thehttp.serverroot span. The render of the error page has arenderErrorPagespan.Nothing changes by default. Nuxt publishes the
nuxt.renderchannel only when the app turns on thenuxtgroup of Nuxt'stracingChanneloption.Why
Nuxt publishes tracing channels for operations that the SDK cannot measure today, for example the page render.
The
http.serverspan of the runtime SDK stays the request root, because it also exists without the channels and it already has the HTTP data and the incoming trace.This is the first of two PRs. #26940 makes the module turn on the option and adds the E2E tests.
Follow-up of #26928.