From 58a193b63b611a2d3971d3ba40eddc7a3bc0928f Mon Sep 17 00:00:00 2001 From: calzoneman Date: Fri, 6 May 2016 20:09:00 -0700 Subject: [PATCH] Add back socket.io:count metric that was accidentally removed --- src/counters.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/counters.js b/src/counters.js index 473e50af..a708cfa6 100644 --- a/src/counters.js +++ b/src/counters.js @@ -29,3 +29,6 @@ function getConnectedSockets() { const reporter = new JSONFileMetricsReporter('counters.log'); Metrics.setReporter(reporter); Metrics.setReportInterval(60000); +Metrics.addReportHook((metrics) => { + metrics.incCounter('socket.io:count', getConnectedSockets()); +});