Update Vue and Nuxt component tracking docs: Options API requirement and stale defaults

Aperta
#19,290 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@s1gr1d ci sta già lavorando.

Dal 7/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Docs Platform: JavaScript SDKs
SDK

JavaScript SDK

Description

Follow-up to getsentry/sentry-javascript#23375.

Nuxt 5 disables Vue's Options API by default
(nuxt/nuxt#35791), which turns app.mixin() into a silent no-op. The SDK records the default
spans through an app.mount() wrap instead; component tracking (trackComponents) still needs
the Options API.

Affected pages:

What to document

  • Component tracking needs the Options API. trackComponents (and non-default hooks)
    only work through app.mixin(). The SDK logs a console warning when the mixin is unavailable.
  • Nuxt 5 callout. The Options API is off by default there; component spans need
    vue: { optionsApi: true } in nuxt.config.ts. Plain Vue users control it through the
    __VUE_OPTIONS_API__ define in their bundler.
  • Default spans work without the Options API. Application Render and the root
    Vue <Root> mount span are always recorded. On Nuxt without the Options API, the root render
    span extends until the page's <Suspense> boundary resolves.
  • Fix the default hook set. Both pages say ['activate', 'mount', 'update']; the SDK
    default is ['activate', 'mount'] (packages/vue/src/constants.ts).
  • Fix the span op. The Vue page says ui.vue.render; the SDK emits op ui.render with
    origin auto.ui.vue.
  • Fix the timeout wording. "Waits for the last component to render" is wrong: debounce
    timers are per component, so late mounts (async components, lazy routes, <Suspense>) do not
    extend the span. It ends with the initial synchronous render.
  • Root component is always tracked. hooks apply to the root even with
    trackComponents: false, e.g. hooks: ['update'] alone produces a Vue <Root> ui.update
    span. Undocumented on both pages.

References

  • packages/vue/src/tracing.ts, packages/vue/src/constants.ts
  • packages/vue/test/integration/mixinRegistration.test.ts (root tracking, hook behavior, late
    children not extending the span)
  • dev-packages/e2e-tests/test-applications/vue-3/tests/performance.test.ts (delayed async
    component, both variants)
Suggested Solution

No response

Lingua principale
MDX
Stelle
451
Fork
1.7k
Merge medio
1g 10h
PR unite (30g)
566

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-docs

Tutte le issue di getsentry/sentry-docs

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.