add some logging in

This commit is contained in:
Henry Oswald 2018-12-11 16:07:34 +00:00
parent c257482e15
commit 9eac49ad84

View file

@ -19,15 +19,19 @@ module.exports = Metrics =
initialize: (_name) ->
appname = _name
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
logger.log("ENABLE_TRACE_AGENT set to #{process.env['ENABLE_TRACE_AGENT']}")
if process.env['ENABLE_TRACE_AGENT'] == "true"
logger.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']}")
if process.env['ENABLE_DEBUG_AGENT'] == "true"
logger.log("starting google debug agent")
debugAgent = require('@google-cloud/debug-agent')
debugAgent.start({
serviceContext: {