mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-16 19:51:59 +00:00
use console.log not logger.log
we don't habe verbiouse lossing enabled that early in the apps lifecycle also best not to require modules before enabling profiler
This commit is contained in:
parent
7999b33faa
commit
d4faaaa60e
1 changed files with 6 additions and 7 deletions
|
@ -27,20 +27,19 @@ module.exports = Metrics =
|
|||
appname = _name
|
||||
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
|
||||
|
||||
logger = require("logger-sharelatex")
|
||||
|
||||
logger.log("ENABLE_TRACE_AGENT set to #{process.env['ENABLE_TRACE_AGENT']}")
|
||||
console.log("ENABLE_TRACE_AGENT set to #{process.env['ENABLE_TRACE_AGENT']}")
|
||||
if process.env['ENABLE_TRACE_AGENT'] == "true"
|
||||
logger.log("starting google trace agent")
|
||||
console.log("starting google trace agent")
|
||||
traceAgent = require('@google-cloud/trace-agent')
|
||||
|
||||
traceOpts =
|
||||
ignoreUrls: [/^\/status/, /^\/health_check/]
|
||||
traceAgent.start(traceOpts)
|
||||
|
||||
logger.log("ENABLE_DEBUG_AGENT set to #{process.env['ENABLE_DEBUG_AGENT']}")
|
||||
console.log("ENABLE_DEBUG_AGENT set to #{process.env['ENABLE_DEBUG_AGENT']}")
|
||||
if process.env['ENABLE_DEBUG_AGENT'] == "true"
|
||||
logger.log("starting google debug agent")
|
||||
console.log("starting google debug agent")
|
||||
debugAgent = require('@google-cloud/debug-agent')
|
||||
debugAgent.start({
|
||||
allowExpressions: true,
|
||||
|
@ -50,9 +49,9 @@ module.exports = Metrics =
|
|||
}
|
||||
})
|
||||
|
||||
logger.log("ENABLE_PROFILE_AGENT set to #{process.env['ENABLE_PROFILE_AGENT']}")
|
||||
console.log("ENABLE_PROFILE_AGENT set to #{process.env['ENABLE_PROFILE_AGENT']}")
|
||||
if process.env['ENABLE_PROFILE_AGENT'] == "true"
|
||||
logger.log("starting google profile agent")
|
||||
console.log("starting google profile agent")
|
||||
profiler = require('@google-cloud/profiler')
|
||||
profiler.start({
|
||||
serviceContext: {
|
||||
|
|
Loading…
Reference in a new issue