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

feat: Using impact metrics with flags (#10355)

This commit is contained in:
Mateusz Kwasniewski 2025-07-15 08:42:38 +02:00 committed by GitHub
parent 34feef990e
commit 998834245c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -792,7 +792,11 @@ export function registerPrometheusMetrics(
appName,
})
.observe(time);
config.flagResolver.impactMetrics?.incrementCounter(REQUEST_COUNT);
config.flagResolver.impactMetrics?.incrementCounter(
REQUEST_COUNT,
1,
{ flagNames: ['consumptionModel'], context: {} },
);
},
);
@ -1145,6 +1149,7 @@ export function registerPrometheusMetrics(
config.flagResolver.impactMetrics?.updateGauge(
HEAP_MEMORY_TOTAL,
process.memoryUsage().heapUsed,
{ flagNames: ['consumptionModel'], context: {} },
);
featureTogglesArchivedTotal.reset();
featureTogglesArchivedTotal.set(