3 var env
= require('gitter-web-env');
4 var logger
= env
.logger
;
6 var shutdown
= require('shutdown');
8 module
.exports = function(prefix
, server
) {
9 var timer
= setInterval(function() {
10 server
.getConnections(function(err
, connections
) {
12 return logger
.error('Unable to enumerate server connections: ' + err
, { exception
: err
});
13 stats
.gaugeHF(prefix
+ '.connections', connections
);
17 shutdown
.addHandler('server-stats', 30, function(callback
) {