Fix stat named map providers cache count

This commit is contained in:
Daniel García Aubert
2020-03-20 18:50:22 +01:00
parent d2c0f553fc
commit 69a02bcee0
+1 -1
View File
@@ -14,8 +14,8 @@ module.exports = class NamedMapProviderReporter {
const { statsClient: stats } = global;
this.intervalId = setInterval(() => {
stats.gauge(statKeyTemplate({ metric: 'named-map.count' }), cache.length);
const providers = cache.dump();
stats.gauge(statKeyTemplate({ metric: 'named-map.count' }), providers.length);
const namedMapInstantiations = providers.reduce((acc, { v: providers }) => {
acc += Object.keys(providers).length;