next.js
d51a84ec - Record Instant Insights validation worker spans (#98677)

Commit
24 days ago
Record Instant Insights validation worker spans (#98677) ## Before this PR Instant Insights shows the main thread's Run validation span, but component loading and validation renders run in a worker with separate in-memory tracing state. Their spans never reach Request Insights. ## After this PR - Collect completed Next.js spans from component loading through validation in the worker, using the local collector from #98676. - Return one bounded batch through the existing validation result message. The main thread remaps IDs and attaches worker roots beneath the real Run validation span, using its retained request identity. - Discard superseded validation results and report omitted spans. Keep the in-process validation path working without worker transport. This does not create a fake parent span, swap a global recorder, initialize another OpenTelemetry provider, forward user OpenTelemetry data, or change cache and WorkStore behavior. ## Verification - 69 focused tracing/store tests passed at this layer, including collector isolation, parent relationships and batch import. - Request Insights development tests passed with Turbopack and Webpack on the assembled stack. --------- Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Will Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
Author
Parents
Loading