diff --git a/lib/api/middlewares/profiler.js b/lib/api/middlewares/profiler.js index a3cb584f..c505a77d 100644 --- a/lib/api/middlewares/profiler.js +++ b/lib/api/middlewares/profiler.js @@ -2,13 +2,13 @@ const Profiler = require('../../stats/profiler-proxy'); const debug = require('debug')('windshaft:cartodb:stats'); +const { name: prefix } = require('../../../package.json'); module.exports = function profiler (options) { const { enabled = true, statsClient } = options; return function profilerMiddleware (req, res, next) { const { logger } = res.locals; - const { id } = logger.bindings(); // TODO: stop using profiler and log stats instead of adding them to the profiler req.profiler = new Profiler({ @@ -16,7 +16,7 @@ module.exports = function profiler (options) { profile: enabled }); - req.profiler.start(id); + req.profiler.start(prefix); res.on('finish', () => { req.profiler.done('response');