UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

24 lines 796 B
import { Counter, Gauge, type Registry } from 'prom-client'; export interface MetricSample { labels?: Record<string, string | number>; value: number; } export interface Metric { name: string; help: string; type: 'counter' | 'gauge'; samples: MetricSample[]; } export declare class MetricsTranslator { private registry; constructor(registry: Registry); sanitizeName(name: string): string; private hasNewLabels; private transformLabels; private addOriginLabel; translateMetric(metric: Metric): Counter<string> | Gauge<string> | null; translateMetrics(metrics: Metric[]): Registry; serializeMetrics(): Promise<string>; translateAndSerializeMetrics(metrics: Metric[]): Promise<string>; } //# sourceMappingURL=metrics-translator.d.ts.map