set build version via env var and bump build version

This commit is contained in:
Henry Oswald 2018-12-10 22:02:25 +00:00
parent 7a227adaeb
commit 425a6f55ff
2 changed files with 5 additions and 3 deletions

View file

@ -22,12 +22,14 @@ module.exports = Metrics =
appname = _name appname = _name
collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()}) collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})
if process.env['ENABLE_TRACE_AGENT'] == "true" if process.env['ENABLE_TRACE_AGENT'] == "true"
traceAgent.start() traceOpts =
ignoreUrls: [/^\/status/, /^\/health_check/]
traceAgent.start(traceOpts)
debugAgent.start({ debugAgent.start({
serviceContext: { serviceContext: {
allowExpressions: true, allowExpressions: true,
service: appname, service: appname,
version: '0.0.1' version: process.env['BUILD_VERSION']
} }
}) })
Metrics.inc("process_startup") Metrics.inc("process_startup")

View file

@ -1,6 +1,6 @@
{ {
"name": "metrics-sharelatex", "name": "metrics-sharelatex",
"version": "2.0.8", "version": "2.0.9",
"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",