type Severity = 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL'; type AttributeValue = string | number | boolean | Array; type Attributes = Record; interface RumUserOptions { id: string; attributes?: Attributes; } type InstrumentationName = 'page-load' | 'route-change' | 'react-router' | 'next-pages-router' | 'next-app-router' | 'network' | 'error' | 'interaction' | 'web-vitals' | 'resource-timing'; interface RumOptions { collectorUrl?: string; headers?: Record; sampleRate?: number; environment?: string; release?: string; websiteVersion?: string; country?: string; user?: string | RumUserOptions; enabledInstrumentations?: InstrumentationName[]; ignoreUrls?: Array; propagateTraceHeaders?: boolean; propagateTraceHeadersAllowList?: Array; captureBodies?: boolean; payloadCompression?: 'gzip' | 'none'; redact?: { urlQueryKeys?: string[]; }; beforeSendBatch?: (metadata: TelemetryBatchMetadata) => boolean | void; } interface TelemetryBatchMetadata { kind: 'traces' | 'logs'; size: number; } interface SpanHandle { setAttribute(key: string, value: AttributeValue): void; addEvent(name: string, attributes?: Attributes): void; setStatus(status: 'OK' | 'ERROR' | 'UNSET', message?: string): void; end(): void; } interface LogApi { (severity: Severity, body: unknown, attributes?: Attributes): void; trace(body: unknown, attrs?: Attributes): void; debug(body: unknown, attrs?: Attributes): void; info(body: unknown, attrs?: Attributes): void; warn(body: unknown, attrs?: Attributes): void; error(body: unknown, attrs?: Attributes): void; fatal(body: unknown, attrs?: Attributes): void; } interface RumInstance { log: LogApi; startSpan(name: string, attributes?: Attributes): SpanHandle; addEvent(name: string, attributes?: Attributes): void; setGlobalAttribute(key: string, value: AttributeValue): void; removeGlobalAttribute(key: string): void; setUser(userId: string, attributes?: Attributes): void; clearUser(): void; flush(): Promise; shutdown(): Promise; } export type { AttributeValue as A, InstrumentationName as I, LogApi as L, RumInstance as R, Severity as S, TelemetryBatchMetadata as T, RumOptions as a, Attributes as b, RumUserOptions as c, SpanHandle as d };