({ metric })
| 254 | } |
| 255 | |
| 256 | const onInp: InstrumentationHandlerCallback = ({ metric }) => { |
| 257 | if (metric.value == null) { |
| 258 | return; |
| 259 | } |
| 260 | |
| 261 | const duration = msToSec(metric.value); |
| 262 | |
| 263 | if (duration > MAX_PLAUSIBLE_INP_DURATION) { |
| 264 | return; |
| 265 | } |
| 266 | |
| 267 | const entry = metric.entries.find(e => e.duration === metric.value && INP_ENTRY_MAP[e.name]); |
| 268 | |
| 269 | if (!entry) { |
| 270 | return; |
| 271 | } |
| 272 | |
| 273 | _sendInpSpan(metric.value, entry); |
| 274 | }; |
| 275 | |
| 276 | addInpInstrumentationHandler(onInp); |
| 277 | } |
nothing calls this directly
no test coverage detected