require logger

This commit is contained in:
Henry Oswald 2018-12-12 21:05:33 +00:00
parent a86c4d8abd
commit db4ae84bda

View file

@ -1,4 +1,3 @@
prom = require('prom-client')
Register = require('prom-client').register
collectDefaultMetrics = prom.collectDefaultMetrics
@ -19,6 +18,8 @@ module.exports = Metrics =
initialize: (_name) ->
appname = _name
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
logger = require("logger-sharelatex")
logger.log("ENABLE_TRACE_AGENT set to #{process.env['ENABLE_TRACE_AGENT']}")
if process.env['ENABLE_TRACE_AGENT'] == "true"
@ -51,6 +52,7 @@ module.exports = Metrics =
version: process.env['BUILD_VERSION']
}
})
Metrics.inc("process_startup")
registerDestructor: (func) ->