stats: Add http500, memoryUsage, pendingEdits gauges

and turn edits metric into a timer instead of a simple meter
This commit is contained in:
Marcel Klehr 2013-10-27 21:43:32 +01:00
parent 387091c5c9
commit 3ad4b1b837
3 changed files with 14 additions and 2 deletions

View file

@ -1,5 +1,6 @@
var os = require("os");
var db = require('../../db/DB');
var stats = require('ep_etherpad-lite/node/stats')
exports.onShutdown = false;
@ -40,6 +41,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
// allowing you to respond however you like
res.send(500, { error: 'Sorry, something bad happened!' });
console.error(err.stack? err.stack : err.toString());
stats.meter('http500').mark()
})
//connect graceful shutdown with sigint and uncaughtexception