|
@@ -34,8 +34,19 @@ module.exports = Metrics =
|
|
|
logger.log("starting google debug agent")
|
|
logger.log("starting google debug agent")
|
|
|
debugAgent = require('@google-cloud/debug-agent')
|
|
debugAgent = require('@google-cloud/debug-agent')
|
|
|
debugAgent.start({
|
|
debugAgent.start({
|
|
|
|
|
+ allowExpressions: true,
|
|
|
|
|
+ serviceContext: {
|
|
|
|
|
+ service: appname,
|
|
|
|
|
+ version: process.env['BUILD_VERSION']
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ logger.log("ENABLE_PROFILER_AGENT set to #{process.env['ENABLE_PROFILER_AGENT']}")
|
|
|
|
|
+ if process.env['ENABLE_PROFILER_AGENT'] == "true"
|
|
|
|
|
+ logger.log("starting google profile agent")
|
|
|
|
|
+ profiler = require('@google-cloud/profiler')
|
|
|
|
|
+ profiler.start({
|
|
|
serviceContext: {
|
|
serviceContext: {
|
|
|
- allowExpressions: true,
|
|
|
|
|
service: appname,
|
|
service: appname,
|
|
|
version: process.env['BUILD_VERSION']
|
|
version: process.env['BUILD_VERSION']
|
|
|
}
|
|
}
|