import LogEventProcessor from './LogEventProcessor'; import { DiagnosticsSamplingRate } from './SpecStore'; import { StatsigOptions } from './StatsigOptions'; export declare const MAX_SAMPLING_RATE = 10000; export interface Marker { key: KeyType; action: ActionType; step: StepType | null; value: string | number | boolean | null; timestamp: number; metadata?: MarkerMetadata; } export interface MarkerMetadata { url?: string; } export type ContextType = 'initialize' | 'config_sync' | 'event_logging'; export type KeyType = 'download_config_specs' | 'bootstrap' | 'get_id_list' | 'get_id_list_sources' | 'overall'; export type StepType = 'process' | 'network_request'; export type ActionType = 'start' | 'end'; type DiagnosticsMarkers = { initialize: Marker[]; config_sync: Marker[]; event_logging: Marker[]; }; export default class Diagnostics { markers: DiagnosticsMarkers; private disable; private logger; private options; constructor(args: { logger: LogEventProcessor; options?: StatsigOptions; markers?: DiagnosticsMarkers; }); mark(context: ContextType, key: KeyType, action: ActionType, step?: StepType, value?: string | number | boolean, metadata?: Record): void; addMarker(context: ContextType, marker: Marker): void; logDiagnostics(context: ContextType, optionalArgs?: { type: 'id_list' | 'config_spec' | 'initialize'; samplingRates: DiagnosticsSamplingRate; }): void; private getShouldLogDiagnostics; } export {};