mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'master' into ho-stackdriver2
This commit is contained in:
commit
f7deba6de9
2 changed files with 14 additions and 1 deletions
|
@ -1,6 +1,9 @@
|
|||
StatsD = require('lynx')
|
||||
statsd = new StatsD(process.env["STATSD_HOST"] or "localhost", 8125, {on_error:->})
|
||||
|
||||
traceAgent = require('@google-cloud/trace-agent')
|
||||
debugAgent = require('@google-cloud/debug-agent')
|
||||
|
||||
prom = require('prom-client')
|
||||
Register = require('prom-client').register
|
||||
collectDefaultMetrics = prom.collectDefaultMetrics
|
||||
|
@ -23,6 +26,14 @@ module.exports = Metrics =
|
|||
initialize: (_name) ->
|
||||
name = _name
|
||||
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
|
||||
traceAgent.start()
|
||||
debugAgent.start({
|
||||
serviceContext: {
|
||||
allowExpressions: true,
|
||||
service: name,
|
||||
version: '0.0.1'
|
||||
}
|
||||
})
|
||||
|
||||
registerDestructor: (func) ->
|
||||
destructors.push func
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
"coffee-script": "1.6.0",
|
||||
"lynx": "~0.1.1",
|
||||
"prom-client": "^11.1.3",
|
||||
"underscore": "~1.6.0"
|
||||
"underscore": "~1.6.0",
|
||||
"@google-cloud/debug-agent": "^3.0.0",
|
||||
"@google-cloud/trace-agent": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunyan": "^1.0.0",
|
||||
|
|
Loading…
Reference in a new issue