Files
62467ee5cc fix(instrumentation): await instrumentation in RouteModule.prepare (#94306)
Closes #93994
Unfortunately deploy tests can't pass on external PRs like #93994
currently due to missing secrets

----


The per-request call to ensureInstrumentationRegistered() inside
RouteModule.prepare was missing an await, so when an adapter dispatches
the compiled app-route template's handler without going through
BaseServer.handleRequest (where prepareImpl awaits it via
runInstrumentationHookIfAvailable), a cold-start request could begin
executing the userland route handler before
instrumentation.ts#register() resolved. The other two call sites
(next-server.ts and web/adapter.ts) already await; this aligns the
third.

This only caused a problem with adapters

---------

Co-authored-by: Maurits Misana <[email protected]>
Co-authored-by: Tim Neutkens <[email protected]>
2026-06-01 17:19:46 +02:00

2 lines
20 B
JavaScript