UNPKG

unleash-server

Version:

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

30 lines 1.16 kB
import type { IUnleashConfig } from '../../../types/index.js'; export interface StoredCustomMetric { name: string; value: number; labels?: Record<string, string>; timestamp: Date; } export interface ICustomMetricsStore { addMetric(metric: Omit<StoredCustomMetric, 'timestamp'>): void; addMetrics(metrics: Omit<StoredCustomMetric, 'timestamp'>[]): void; getMetrics(): StoredCustomMetric[]; getMetricsByName(name: string): StoredCustomMetric[]; getMetricNames(): string[]; getPrometheusMetrics(): string; } export declare class CustomMetricsStore implements ICustomMetricsStore { private logger; private customMetricsStore; constructor(config: IUnleashConfig); private roundToMinute; private getMetricKey; addMetric(metric: Omit<StoredCustomMetric, 'timestamp'>): void; addMetrics(metrics: Omit<StoredCustomMetric, 'timestamp'>[]): void; getMetrics(): StoredCustomMetric[]; getMetricsByName(name: string): StoredCustomMetric[]; getMetricNames(): string[]; getPrometheusMetrics(): string; private escapePrometheusString; } //# sourceMappingURL=custom-metrics-store.d.ts.map