import { WebVitalsInstrumentationConfig } from "./types.js"; import { InstrumentationBase } from "@opentelemetry/instrumentation"; //#region src/web-vitals/instrumentation.d.ts /** * Instrumentation for Core Web Vitals using the `web-vitals` library. * https://github.com/GoogleChrome/web-vitals * * Note: The `web-vitals` library does not support removing listeners once * registered. Calling `disable()` will stop emitting logs, but the underlying * listeners remain active. Calling `enable()` again will resume emission. */ declare class WebVitalsInstrumentation extends InstrumentationBase { private _isEnabled; private _listenersRegistered; private _applyCustomLogRecordData?; private _includeRawAttribution; constructor(config?: WebVitalsInstrumentationConfig); protected init(): never[]; /** * Enables the instrumentation and registers web-vitals listeners. * Listeners are registered only once. If disabled, subsequent calls resume emission. */ enable(): void; /** * Disables the instrumentation, pausing log emission. * Listeners remain active due to web-vitals library limitations. */ disable(): void; /** * Gets the timestamp for a metric based on attribution timing. * Returns undefined to let OTel use the current time for metrics without * specific timing information. */ private _getTimestampForMetric; private _emitWebVital; } //#endregion export { WebVitalsInstrumentation }; //# sourceMappingURL=instrumentation.d.ts.map