Fix stat named map providers cache count
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user