diff --git a/libraries/metrics/metrics.coffee b/libraries/metrics/metrics.coffee index d23f3ec06d..1da51b63b9 100644 --- a/libraries/metrics/metrics.coffee +++ b/libraries/metrics/metrics.coffee @@ -14,11 +14,30 @@ destructors = [] 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 = initialize: (_name) -> name = _name collectDefaultMetrics({ timeout: 5000, prefix: name }) - + traceAgent.start() + debugAgent.start({ + serviceContext: { + allowExpressions: true, + service: name, + version: '0.0.1' + } + }) registerDestructor: (func) -> destructors.push func diff --git a/libraries/metrics/package.json b/libraries/metrics/package.json index d3421a3619..648d4d627b 100644 --- a/libraries/metrics/package.json +++ b/libraries/metrics/package.json @@ -22,6 +22,8 @@ "grunt-execute": "^0.2.2", "grunt-mocha-test": "^0.11.0", "sandboxed-module": "", - "sinon": "" + "sinon": "", + "@google-cloud/debug-agent": "^3.0.0", + "@google-cloud/trace-agent": "^3.2.0" } }