import { EventEmitter } from 'events'; import { UsageData } from '../types'; export interface MetricsConfig { enabled?: boolean; provider?: 'prometheus' | 'statsd' | 'custom'; endpoint?: string; prefix?: string; flushInterval?: number; } export interface MetricData { name: string; value: number; type: 'counter' | 'gauge' | 'histogram'; tags?: Record; timestamp: Date; } /** * Metrics collection system for usage tracking */ export declare class MetricsCollector extends EventEmitter { private config; private metrics; private flushInterval; private isInitialized; constructor(config?: MetricsConfig); /** * Initialize metrics collection */ initialize(): Promise; /** * Record usage data as metrics */ record(usage: UsageData): Promise; /** * Increment a counter metric */ incrementCounter(name: string, tags?: Record): void; /** * Record a gauge metric */ recordGauge(name: string, value: number, tags?: Record): void; /** * Record a histogram metric */ recordHistogram(name: string, value: number, tags?: Record): void; /** * Get current metrics */ getMetrics(): MetricData[]; /** * Get metrics summary */ getMetricsSummary(): any; /** * Clear all metrics */ clearMetrics(): void; /** * Flush metrics to configured provider */ flush(): Promise; /** * Update configuration */ updateConfig(config: Partial): Promise; /** * Get collector status */ getStatus(): any; /** * Generate metric key for deduplication */ private getMetricKey; /** * Flush metrics to Prometheus */ private flushToPrometheus; /** * Flush metrics to StatsD */ private flushToStatsd; /** * Flush metrics to custom endpoint */ private flushToCustom; /** * Cleanup resources */ cleanup(): Promise; } //# sourceMappingURL=MetricsCollector.d.ts.map