# EventLoopInstrumentationConfig

**Kind**: interface | **Module**: [Insights](https://docs.interop.io/desktop/reference/javascript/insights/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/insights/eventloopinstrumentationconfig/index.html

Configuration for the event loop responsiveness instrumentation.

Both measurements are event-driven (no polling): samples record only when the
browser delivers a performance entry, so an idle or smooth application produces
none. Metric export follows the meter's publish interval as usual.

## Properties

- **`enabled`** (`boolean`, required)
  Whether the event loop instrumentation is enabled.
- **`eventLoopBlockingMetric`** (`boolean | string | null`, optional) default: `false`
  If `true` or a string, the main-thread blocking time per long frame (the time
  beyond the 50ms threshold, per the Long Animation Frames API's blockingDuration;
  where only Long Tasks are available, task duration minus 50ms) is published as a
  histogram metric. If a string value is specified, this will be the name of the
  metric. Otherwise, the default "io.insights.event_loop.blocking.duration" is used
  (no semantic convention exists for this metric). Zero-blocking frames contribute
  no sample. The "measurement" attribute says which API produced each sample.
- **`eventLoopBlockingMetricBuckets`** (`number[]`, optional) default: `[0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5]`
  Explicit histogram bucket boundaries for eventLoopBlockingMetric, in seconds,
  ascending.
- **`eventLoopBlockingSpans`** (`boolean`, optional) default: `true`
  If `true`, main-thread-blocking long frames are published as spans
  ("interopio.api.instrumentation.eventLoopBlocking") spanning the frame, with the
  blocking duration and (where the Long Animation Frames API is available) the
  attribution of the longest script in the frame.
- **`inputDelayDurationThresholdMs`** (`number`, optional) default: `16`
  The Event Timing API durationThreshold, in milliseconds: only input events whose
  total duration (event timestamp until next paint) reaches this value are observed.
  The browser floor is 16ms.
- **`inputDelayInteractionsOnly`** (`boolean`, optional) default: `true`
  If `true`, only interaction-eligible events (Event Timing entries with a non-zero
  interactionId - discrete interactions like clicks and key presses, the population
  INP is computed over) are observed. Disabling it also surfaces continuous events
  (pointermoves etc.) that meet the duration threshold.
- **`inputDelayMetric`** (`boolean | string | null`, optional) default: `false`
  If `true` or a string, the input event queueing delay (event timestamp until its
  handlers started running - the event loop latency a user experienced) is published
  as a histogram metric. If a string value is specified, this will be the name of the
  metric. Otherwise, the default "io.insights.event_loop.input.delay" is used (no
  semantic convention exists for this metric).

  Only events whose total duration reaches inputDelayDurationThresholdMs are surfaced
  by the browser, so the distribution describes slow-ish interactions, not all input.
- **`inputDelayMetricBuckets`** (`number[]`, optional) default: `[0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1]`
  Explicit histogram bucket boundaries for inputDelayMetric, in seconds, ascending.
  The default brackets the INP "good" (0.2s) and "poor" (0.5s) thresholds.
- **`inputDelaySpans`** (`boolean`, optional) default: `true`
  If `true`, slow input events are published as spans
  ("interopio.api.instrumentation.inputDelay") spanning the event's timestamp until
  its next paint, with the input delay / processing / presentation phases and the
  same element-describing attributes as the clickstream spans (elementIdOrPath,
  elementSelectorString, ...).
- **`trace`** (`boolean`, optional) default: `true`
  If `false`, no spans are published - metrics-only mode: the input-delay
  and blocking histograms keep reporting. The master switch over
  inputDelaySpans/eventLoopBlockingSpans, which refine it per kind.
