Optional
enabledEnable the detector. Default:
Optional
windowSize of the sliding window (in milliseconds) over which commit metrics are computed. Default: 2000ms (2 seconds).
Optional
commitsThreshold for commits per second that flags a hotspot. Example: if set to 5, more than 5 commits/sec within the window triggers. Default: 5 commits/sec.
Optional
renderThreshold for total render time per second (in milliseconds) that flags a hotspot. Example: if set to 24, more than 24ms of render work per second within the window triggers. Default: 24ms/sec (roughly > 40% of a 60fps frame budget).
Optional
minMinimum number of commits within the window before evaluating thresholds. Prevents noise from one-off commits. Default: 3 commits.
Optional
cooldownCooldown period (ms) after a hotspot is reported before reporting again for the same detector. Default: 5000ms (5s).
Optional
telemetryOptional sample rate (0–100) for sending telemetry to DataDog via addAction
.
Default: 20 (%). Set to 0 to disable telemetry.
Optional
telemetryAction name emitted to DataDog when a hotspot is detected. Default: "render_hotspot".
Optional
onOptional callback invoked when a hotspot is detected. Use this to log locally, show a dev toast, etc.
Optional
includeInclude React Profiler baseDuration and phase in telemetry. Default: true. If false, only time-based aggregates are sent.
Optional
contextArbitrary static context to include on every hotspot report. (Kept shallow to avoid heavy serialization.)
Options controlling when a subtree is considered a render hotspot.