I just stuck to the way it's done in this method (just above mine):
```
Monitor.prototype.responseTimeMiddleware = function(group, key) {
  group = group || 'performance';

  if (typeof key !== 'function') {
    var prefix = key ? key + '.' : '';
    key = function(req, res) {
      var name = req.route.path.replace(/[^\w]+/g, '_');
      return prefix + name;
    };
  }

  var monitor = this;

  return function(req, res, next) {
    if (req._monitoring) {
      return next();
    }
    req._monitoring = true;

    var stopwatch = monitor.start(group, key(req, res));

    var end = res.end;
    res.end = function(chunk, encoding) {
      res.end = end;
      res.end(chunk, encoding);
      stopwatch.end();
    };

    next();
  };
};
```