diff --git a/package.json b/package.json index b102ba807..b67104175 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,12 @@ "imap": "0.8.x", "lerna": "2.0.0-beta.23", "mysql": "^2.11.1", - "newrelic": "^1.28.1", "pm2": "^1.1.3", "promise-props": "^1.0.0", "promise.prototype.finally": "^1.0.1", "redis": "2.x.x", "rx": "4.x.x", "sequelize": "3.x.x", - "signalfx": "^3.0.1", "underscore": "1.x.x", "utf7": "https://github.com/truebit/utf7/archive/1f753bac59b99d93b17a5ef11681e232465e2558.tar.gz" }, diff --git a/packages/nylas-api/app.js b/packages/nylas-api/app.js index 26180ae27..f4979eb95 100644 --- a/packages/nylas-api/app.js +++ b/packages/nylas-api/app.js @@ -1,4 +1,4 @@ -const {Metrics} = require(`nylas-core`) +const Metrics = require(`nylas-metrics`) Metrics.startCapturing('nylas-k2-api') const Hapi = require('hapi'); diff --git a/packages/nylas-api/package.json b/packages/nylas-api/package.json index 7d9f53b24..137f9e340 100644 --- a/packages/nylas-api/package.json +++ b/packages/nylas-api/package.json @@ -17,6 +17,7 @@ "joi": "8.4.2", "nylas-core": "0.x.x", "nylas-sync": "0.x.x", + "nylas-metrics": "0.x.x", "vision": "4.1.0" } } diff --git a/packages/nylas-core/index.js b/packages/nylas-core/index.js index 9cff4c9f7..b6348ddd4 100644 --- a/packages/nylas-core/index.js +++ b/packages/nylas-core/index.js @@ -11,6 +11,5 @@ module.exports = { MessageTypes: require('./message-types'), Logger: require('./logger'), Errors: require('./imap-errors'), - Metrics: require('./metrics'), PromiseUtils: require('./promise-utils'), } diff --git a/packages/nylas-dashboard/app.js b/packages/nylas-dashboard/app.js index 6e520d0e6..dbe069770 100644 --- a/packages/nylas-dashboard/app.js +++ b/packages/nylas-dashboard/app.js @@ -1,4 +1,4 @@ -const {Metrics} = require(`nylas-core`) +const Metrics = require(`nylas-metrics`) Metrics.startCapturing('nylas-k2-dashboard') const fs = require('fs'); diff --git a/packages/nylas-dashboard/package.json b/packages/nylas-dashboard/package.json index f41efb12a..c1d2bc8e0 100644 --- a/packages/nylas-dashboard/package.json +++ b/packages/nylas-dashboard/package.json @@ -12,6 +12,7 @@ "hapi": "13.4.1", "hapi-plugin-websocket": "0.9.2", "inert": "4.0.0", - "nylas-core": "0.x.x" + "nylas-core": "0.x.x", + "nylas-metrics": "0.x.x" } } diff --git a/packages/nylas-message-processor/app.js b/packages/nylas-message-processor/app.js index ccbf51eb8..b2ff487d0 100644 --- a/packages/nylas-message-processor/app.js +++ b/packages/nylas-message-processor/app.js @@ -1,4 +1,4 @@ -const {Metrics} = require(`nylas-core`) +const Metrics = require(`nylas-metrics`) Metrics.startCapturing('nylas-k2-message-processor') const {PubsubConnector, DatabaseConnector, Logger} = require(`nylas-core`) diff --git a/packages/nylas-message-processor/package.json b/packages/nylas-message-processor/package.json index 74ac74f2d..a50b1ccf3 100644 --- a/packages/nylas-message-processor/package.json +++ b/packages/nylas-message-processor/package.json @@ -14,7 +14,8 @@ "jasmine": "2.4.1", "mailparser": "0.6.0", "mimelib": "0.2.19", - "nylas-core": "0.x.x" + "nylas-core": "0.x.x", + "nylas-metrics": "0.x.x" }, "devDependencies": { "babel-cli": "^6.10.1", diff --git a/packages/nylas-core/metrics.js b/packages/nylas-metrics/index.js similarity index 100% rename from packages/nylas-core/metrics.js rename to packages/nylas-metrics/index.js diff --git a/packages/nylas-metrics/package.json b/packages/nylas-metrics/package.json new file mode 100644 index 000000000..923793087 --- /dev/null +++ b/packages/nylas-metrics/package.json @@ -0,0 +1,12 @@ +{ + "name": "nylas-metrics", + "version": "0.0.1", + "description": "Metrics package", + "main": "index.js", + "dependencies": { + "newrelic": "^1.28.1", + "signalfx": "^3.0.1" + }, + "author": "Nylas", + "license": "ISC" +} diff --git a/packages/nylas-sync/app.js b/packages/nylas-sync/app.js index d043707c7..1d8ccd647 100644 --- a/packages/nylas-sync/app.js +++ b/packages/nylas-sync/app.js @@ -1,4 +1,4 @@ -const {Metrics} = require(`nylas-core`) +const Metrics = require(`nylas-metrics`) Metrics.startCapturing('nylas-k2-sync') const {DatabaseConnector, Logger} = require('nylas-core') diff --git a/packages/nylas-sync/package.json b/packages/nylas-sync/package.json index 17f307081..1ac52b60b 100644 --- a/packages/nylas-sync/package.json +++ b/packages/nylas-sync/package.json @@ -5,6 +5,7 @@ "dependencies": { "nylas-core": "0.x.x", "nylas-message-processor": "0.x.x", + "nylas-metrics": "0.x.x", "xoauth2": "1.1.0" }, "scripts": {