/** * Telemetry service implementation */ import { EventEmitter } from 'events'; import { TelemetryConfig, TelemetryEvent } from './types'; /** * Simple in-memory telemetry service for browser-use TypeScript * * This is a basic implementation that can be extended with external services * like PostHog, Mixpanel, or custom analytics endpoints. */ export declare class TelemetryService extends EventEmitter { private config; private userId; private sessionId; private eventQueue; private flushTimer; constructor(config?: Partial); /** * Capture a telemetry event */ capture(event: TelemetryEvent): Promise; /** * Flush all pending events */ flush(): Promise; /** * Get the current session ID */ getSessionId(): string; /** * Get the user ID */ getUserId(): Promise; /** * Shutdown the telemetry service */ shutdown(): Promise; /** * Initialize or load user ID from disk */ private initializeUserId; /** * Send events to the configured endpoint */ private sendEvents; /** * Start the periodic flush timer */ private startFlushTimer; } /** * Get the global telemetry service instance */ export declare function getTelemetryService(): TelemetryService; /** * Initialize telemetry with custom configuration */ export declare function initializeTelemetry(config?: Partial): TelemetryService; /** * Capture a telemetry event using the global service */ export declare function capture(event: TelemetryEvent): Promise; //# sourceMappingURL=service.d.ts.map