1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-31 13:47:02 +02:00

chore: impact metrics resolver signature update (#10352)

This commit is contained in:
Mateusz Kwasniewski 2025-07-14 13:16:25 +02:00 committed by GitHub
parent ed9eccd743
commit 187d24db1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
import { PayloadType, type Variant } from 'unleash-client';
import { parseEnvVarBoolean } from '../util/index.js';
import { getDefaultVariant } from 'unleash-client/lib/variant.js';
import type { MetricFlagContext } from 'unleash-client/lib/impact-metrics/metric-types.js';
import type { Context } from '../features/playground/feature-evaluator/index.js';
export type IFlagKey =
@ -332,6 +333,14 @@ export interface IExternalFlagResolver {
export interface IImpactMetricsResolver {
defineCounter(name: string, help: string);
defineGauge(name: string, help: string);
incrementCounter(name: string, value?: number, featureName?: string): void;
updateGauge(name: string, value: number, featureName?: string): void;
incrementCounter(
name: string,
value?: number,
metricsFlagContext?: MetricFlagContext,
): void;
updateGauge(
name: string,
value: number,
metricsFlagContext?: MetricFlagContext,
): void;
}