import { InstrumentationBase, type InstrumentationConfig } from '@opentelemetry/instrumentation'; import type { Span } from '@opentelemetry/api'; interface SlowEventLoopInfo { delayMs: number; timestampMs: number; } type ApplyCustomAttributesOnSpanFunction = (span: Span, slowEventLoopInfo: SlowEventLoopInfo) => void; export interface SlowEventLoopInstrumentationConfig extends InstrumentationConfig { loopSampleIntervalMs?: number; stallThresholdMs?: number; applyCustomAttributesOnSpan?: ApplyCustomAttributesOnSpanFunction; } export declare class SlowEventLoopInstrumentation extends InstrumentationBase { private _isEnabled; readonly applyCustomAttributesOnSpan?: ApplyCustomAttributesOnSpanFunction; private _lastLoopTimestamp; private _loopSampleIntervalMs; private _stallThresholdMs; private _intervalRef; private _appStateRef; private _isAppSuspended; constructor({ enabled, loopSampleIntervalMs, stallThresholdMs, applyCustomAttributesOnSpan, }?: SlowEventLoopInstrumentationConfig); enable(): void; disable(): void; protected init(): void; private _checkEventLoop; private _emitSlowEventLoopSpan; private _suspendResumeHandler; } export {}; //# sourceMappingURL=SlowEventLoopInstrumentation.d.ts.map