mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add if statment around traceagenet and bump to 2.0.8
This commit is contained in:
parent
254a508a01
commit
7a227adaeb
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
traceAgent = require('@google-cloud/trace-agent')
|
|
||||||
debugAgent = require('@google-cloud/debug-agent')
|
debugAgent = require('@google-cloud/debug-agent')
|
||||||
|
traceAgent = require('@google-cloud/trace-agent')
|
||||||
|
|
||||||
prom = require('prom-client')
|
prom = require('prom-client')
|
||||||
Register = require('prom-client').register
|
Register = require('prom-client').register
|
||||||
|
@ -21,6 +21,7 @@ module.exports = Metrics =
|
||||||
initialize: (_name) ->
|
initialize: (_name) ->
|
||||||
appname = _name
|
appname = _name
|
||||||
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
|
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
|
||||||
|
if process.env['ENABLE_TRACE_AGENT'] == "true"
|
||||||
traceAgent.start()
|
traceAgent.start()
|
||||||
debugAgent.start({
|
debugAgent.start({
|
||||||
serviceContext: {
|
serviceContext: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "metrics-sharelatex",
|
"name": "metrics-sharelatex",
|
||||||
"version": "2.0.7",
|
"version": "2.0.8",
|
||||||
"description": "A drop-in metrics and monitoring module for node.js apps",
|
"description": "A drop-in metrics and monitoring module for node.js apps",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in a new issue