next.js
1722e45c - Fix client component loading span timing (#96455)

Commit
1 day ago
Fix client component loading span timing (#96455) ## Summary - Measure the existing client-component loading span from its first observed start through the latest module or chunk settlement. - Keep overlapping and nested loads within one valid timing interval instead of accumulating durations onto the first start time. - Preserve the original `loadChunk` promise identity while observing both fulfilled and rejected settlements. - Handle rejected chunk loads without creating a second unhandled rejecting promise. - Avoid ending the span while another tracked load remains pending. This corrects an existing span; it does not introduce a new span type. ## Verification - `pnpm exec jest --runInBand packages/next/src/server/client-component-renderer-logger.test.ts` - The final focused Request Insights matrix passed 10 suites and 82/82 tests, including overlapping, nested, pending, fulfilled, and rejected client loads. - `pnpm --filter=next build`
Author
Parents
Loading