hypershield
Version:
Middleware suite for high-performance and resilient APIs
16 lines • 620 B
TypeScript
import * as promClient from 'prom-client';
export declare class MetricsService {
private registry;
private metrics;
constructor();
private initializeDefaultMetrics;
private createCounter;
private createHistogram;
incrementCounter(name: string, labels?: Record<string, string | number>): void;
recordDuration(name: string, duration: number, labels?: Record<string, string | number>): void;
getMetrics(): Promise<string>;
clearMetrics(): void;
getRegistry(): promClient.Registry;
}
export declare const globalMetrics: MetricsService;
//# sourceMappingURL=metricsService.d.ts.map