mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-23 18:53:15 +00:00
add profiler
This commit is contained in:
parent
9eac49ad84
commit
a86c4d8abd
2 changed files with 13 additions and 1 deletions
|
@ -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": {
|
||||
|
|
Loading…
Reference in a new issue