next.js
67325eaf - Turbopack: log telemetry events when `TurbopackInternalError`s occur (#77660)

Commit
268 days ago
Turbopack: log telemetry events when `TurbopackInternalError`s occur (#77660) Note: **This does not include any error content aside from that the error is a `TurbopackInternalError`.** This adds a function, `TurbopackInternalError.createAndRecordTelemetry` that both creates the `TurbopackInternalError` instance and logs that it occurred to telemetry. This telemetry event only includes 1) that an error occurred once and 2) the error code or error name of the error, in this case `TurbopackInternalError`. Test Plan: Added a unit test, `TurbopackInternalError.test.ts` Manual test plan: - Insert a panic into Turbopack source in `analyse_ecmascript_module`. - Run `NEXT_TELEMETRY_DEBUG=1 NODE_OPTIONS="--trace-deprecation --enable-source-maps" pnpm next "build" "--turbo" "test/e2e/app-dir/app/“`. - Verify telemetry debugging shows an event called `NEXT_ERROR_THROWN` with `errorCode` of `TurbopackInternalError`. - Do the same with `NEXT_TELEMETRY_DEBUG=1 NODE_OPTIONS="--trace-deprecation --enable-source-maps" pnpm next "dev" "--turbo" "test/e2e/app-dir/app/“`
Author
Parents
Loading