mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add trace and debug agent to metrics
This commit is contained in:
parent
4b075db038
commit
7e359c9df2
2 changed files with 23 additions and 2 deletions
|
@ -14,11 +14,30 @@ destructors = []
|
||||||
|
|
||||||
require "./uv_threadpool_size"
|
require "./uv_threadpool_size"
|
||||||
|
|
||||||
|
|
||||||
|
traceAgent = require('@google-cloud/trace-agent')
|
||||||
|
debugAgent = require('@google-cloud/debug-agent')
|
||||||
|
|
||||||
|
.start({
|
||||||
|
serviceContext: {
|
||||||
|
allowExpressions: true,
|
||||||
|
service: 'filestore-readonly',
|
||||||
|
version: '0.0.1'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = Metrics =
|
module.exports = Metrics =
|
||||||
initialize: (_name) ->
|
initialize: (_name) ->
|
||||||
name = _name
|
name = _name
|
||||||
collectDefaultMetrics({ timeout: 5000, prefix: name })
|
collectDefaultMetrics({ timeout: 5000, prefix: name })
|
||||||
|
traceAgent.start()
|
||||||
|
debugAgent.start({
|
||||||
|
serviceContext: {
|
||||||
|
allowExpressions: true,
|
||||||
|
service: name,
|
||||||
|
version: '0.0.1'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
registerDestructor: (func) ->
|
registerDestructor: (func) ->
|
||||||
destructors.push func
|
destructors.push func
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
"grunt-execute": "^0.2.2",
|
"grunt-execute": "^0.2.2",
|
||||||
"grunt-mocha-test": "^0.11.0",
|
"grunt-mocha-test": "^0.11.0",
|
||||||
"sandboxed-module": "",
|
"sandboxed-module": "",
|
||||||
"sinon": ""
|
"sinon": "",
|
||||||
|
"@google-cloud/debug-agent": "^3.0.0",
|
||||||
|
"@google-cloud/trace-agent": "^3.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue