Traced Events
Traced Events
Reference of all diagnostic channels and the events they trace
Each traced operation follows the Diagnostic Channels lifecycle:
- Start — When an operation begins, a span is created with contextual attributes (URL, method, component name, etc.)
- Async Context — The span is bound to the current async context via
AsyncLocalStorage, ensuring child spans maintain parent relationships - End — On completion, the span is finalized with response metadata (status code, etc.)
- Error — If the operation fails, the span records the exception and marks the status as error
Available channels
| Channel | Events | Required Nuxt Version |
|---|---|---|
nuxt.render | SSR renders | >= 4.5.0 |
nuxt.island | Island component renders | >= 4.5.0 |
nuxt.data | Data fetching operations | >= 4.5.0 |
nuxt.plugin | Plugin initialization | >= 4.5.0 |
h3.request | HTTP requests via h3 | >= 5.0.0 |
srvx.request | Server route requests | >= 5.0.0 |
srvx.middleware | Server route middleware | >= 5.0.0 |
unstorage.* | Storage operations (get, set, remove, etc.) | >= 5.0.0 |
Enable channels
Configure which channels are active via the tracingChannel Nuxt option:
nuxt.config.ts
export default defineNuxtConfig({
tracingChannel: {
nuxt: true,
h3: true,
srvx: true,
unstorage: true,
},
})
Set tracingChannel: true to enable all channels, or false to disable all.
How the lifecycle works
For every channel, the module hooks into the diagnostic channel's start and end messages:
Render example
- Nuxt emits a
nuxt.render:startmessage with render context (URL, component, etc.) - The module creates an OpenTelemetry span and binds it to the async context
- Child operations (data fetching, island rendering) create child spans
- On
nuxt.render:end, the span is finalized with the response status code - On error, the span records the exception and sets status to error