use ENABLE_PROFILE_AGENT

This commit is contained in:
Henry Oswald 2018-12-12 21:17:12 +00:00
parent db4ae84bda
commit 287effb139

View file

@ -18,7 +18,7 @@ module.exports = Metrics =
initialize: (_name) -> initialize: (_name) ->
appname = _name appname = _name
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()}) collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
logger = require("logger-sharelatex") logger = require("logger-sharelatex")
logger.log("ENABLE_TRACE_AGENT set to #{process.env['ENABLE_TRACE_AGENT']}") logger.log("ENABLE_TRACE_AGENT set to #{process.env['ENABLE_TRACE_AGENT']}")
@ -42,8 +42,8 @@ module.exports = Metrics =
} }
}) })
logger.log("ENABLE_PROFILER_AGENT set to #{process.env['ENABLE_PROFILER_AGENT']}") logger.log("ENABLE_PROFILE_AGENT set to #{process.env['ENABLE_PROFILE_AGENT']}")
if process.env['ENABLE_PROFILER_AGENT'] == "true" if process.env['ENABLE_PROFILE_AGENT'] == "true"
logger.log("starting google profile agent") logger.log("starting google profile agent")
profiler = require('@google-cloud/profiler') profiler = require('@google-cloud/profiler')
profiler.start({ profiler.start({