Add back socket.io:count metric that was accidentally removed

This commit is contained in:
calzoneman 2016-05-06 20:09:00 -07:00
parent d61005e419
commit 58a193b63b
1 changed files with 3 additions and 0 deletions

View File

@ -29,3 +29,6 @@ function getConnectedSockets() {
const reporter = new JSONFileMetricsReporter('counters.log'); const reporter = new JSONFileMetricsReporter('counters.log');
Metrics.setReporter(reporter); Metrics.setReporter(reporter);
Metrics.setReportInterval(60000); Metrics.setReportInterval(60000);
Metrics.addReportHook((metrics) => {
metrics.incCounter('socket.io:count', getConnectedSockets());
});