UNPKG

nestjs-metrics-reporter

Version:

A global static Prometheus metrics reporter for NestJS applications

16 lines (15 loc) 886 B
import { OnApplicationBootstrap } from '@nestjs/common'; import { MetricsService } from '../metrics/metrics.service'; export declare class ReporterService implements OnApplicationBootstrap { private readonly metrics; private static readonly logger; private static metricsService; constructor(metrics: MetricsService); onApplicationBootstrap(): void; static counter(key: string, labels?: Record<string, string | number>, value?: number): void; static gauge(key: string, value: number, labels?: Record<string, string | number>): void; static histogram(key: string, value: number, labels?: Record<string, string | number>, buckets?: number[]): void; static summary(key: string, value: number, labels?: Record<string, string | number>, percentiles?: number[]): void; static pushMetrics(jobName: string): Promise<void>; private static logError; }