The "JS Bundle Execution Before React Root" child span on app start already captures JS bytecode load + evaluation duration (from getBundleStartTimestampMs() to rootComponentCreationTimestampMs). However, this duration is only available as a child span — it's not emitted as a top-level transaction measurement, unlike app_start_cold/app_start_warm and time_to_initial_display/time_to_full_display which get both spans and measurements.
Surfacing it as a measurement (e.g. js_bundle_execution) would make it independently queryable and dashboardable.
Implementation
In appStart.ts attachAppStartToTransactionEvent(), after the existing app start measurement is set (~line 646), add:
if (jsExecutionSpanJSON) {
setSpanDurationAsMeasurementOnTransactionEvent(event, 'js_bundle_execution', jsExecutionSpanJSON);
}
This works for both standalone and non-standalone app start modes since both go through attachAppStartToTransactionEvent.
Caveats
Scope
JS only. ~5 lines of code + tests.
The "JS Bundle Execution Before React Root" child span on app start already captures JS bytecode load + evaluation duration (from
getBundleStartTimestampMs()torootComponentCreationTimestampMs). However, this duration is only available as a child span — it's not emitted as a top-level transaction measurement, unlikeapp_start_cold/app_start_warmandtime_to_initial_display/time_to_full_displaywhich get both spans and measurements.Surfacing it as a measurement (e.g.
js_bundle_execution) would make it independently queryable and dashboardable.Implementation
In
appStart.tsattachAppStartToTransactionEvent(), after the existing app start measurement is set (~line 646), add:This works for both standalone and non-standalone app start modes since both go through
attachAppStartToTransactionEvent.Caveats
rootComponentCreationTimestampMsbeing set (viaSentry.wrap()). If not set, the span is a zero-duration marker — skip the measurement in that case.js_bundle_execution) needs alignment with the product/backend team so it's recognized, indexed, and displayed in the UI.Scope
JS only. ~5 lines of code + tests.