next.js
0311e143 - Trace instrumentation startup (#97296)

Commit
24 days ago
Trace instrumentation startup (#97296) ## Summary - trace instrumentation module loading and `register()` execution as separate startup spans - preserve the original timestamps when the OpenTelemetry provider is installed by `register()` itself - export both lifecycle spans by default without attaching them to an unrelated request - verify standard and direct-entrypoint startup with a collector connected before the server starts ## Why Loading `instrumentation.ts` and running the user-defined `register()` hook have different owners and remediation paths. Separate spans make startup delays attributable while preserving honest lifecycle parentage: these spans normally occur before a request identity exists. ## Verification - `pnpm build-all` - `pnpm --filter=next build` - `pnpm --filter=next types` - `pnpm exec jest packages/next/src/server/lib/trace/tracer.test.ts --runInBand` - focused instrumentation-startup E2E in development and production with Turbopack and Webpack - Prettier, ESLint, and `git diff --check` ## Stack Depends on **Trace route module preparation**.
Author
Parents
Loading