datadog-ux-utils
Version:
Datadog RUM focused UX & performance toolkit: API guards (retry, breaker, rate), React telemetry (error boundary, profiler, Suspense), web vitals & resource observers, offline queues.
27 lines • 1.03 kB
TypeScript
/**
* Capture oversized or slow-loading resources from the Performance API
* and send summary events to DataDog.
*/
/**
* Capture oversized or slow-loading resources from the Performance API and send summary events to Datadog.
* @param opts - Optional thresholds and sample rate for reporting.
*/
export declare const reportLargeOrSlowResources: (opts?: {
sizeKbThreshold?: number;
durationMsThreshold?: number;
sampleRate?: number;
}) => void;
/**
* Run on initial load, or after route changes if your app lazy-loads assets.
* Optionally call multiple times in SPA environments.
*/
/**
* Reports resources on initial load or after route changes, with optional delay and thresholds.
* @param delayMs - Delay in milliseconds before reporting.
* @param thresholds - Optional thresholds for size and duration.
*/
export declare const reportResourcesOnLoad: (delayMs?: number, thresholds?: {
sizeKbThreshold?: number;
durationMsThreshold?: number;
}) => void;
//# sourceMappingURL=resources.d.ts.map