mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 21:59:00 +02:00
add profiler
This commit is contained in:
@@ -34,8 +34,19 @@ module.exports = Metrics =
|
||||
logger.log("starting google debug agent")
|
||||
debugAgent = require('@google-cloud/debug-agent')
|
||||
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: {
|
||||
allowExpressions: true,
|
||||
service: appname,
|
||||
version: process.env['BUILD_VERSION']
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"prom-client": "^11.1.3",
|
||||
"underscore": "~1.6.0",
|
||||
"@google-cloud/debug-agent": "^3.0.0",
|
||||
"@google-cloud/profiler": "0.2.3",
|
||||
"@google-cloud/trace-agent": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user