Unverified Commit 40a5da53 authored by Jude Gao's avatar Jude Gao Committed by GitHub

Fix telemetry event race condition in webpack worker for @vercel/og detection (#86145)

parent dcd9be7a
......@@ -414,5 +414,7 @@ export async function workerMain(workerData: {
result.buildTraceContext!.chunksTrace!.entryNameFilesMap = entryNameFilesMap
}
NextBuildContext.nextBuildSpan.stop()
await telemetry.flush()
return { ...result, debugTraceEvents: getTraceEvents() }
}
......@@ -441,6 +441,7 @@ describe('config telemetry', () => {
;(process.env.IS_TURBOPACK_TEST ? it.skip : it)(
'emits telemetry for usage of @vercel/og',
async () => {
// Test vercelImageGeneration telemetry tracking
const { stderr } = await nextBuild(appDir, [], {
stderr: true,
env: { NEXT_TELEMETRY_DEBUG: '1' },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment