From 93189b0f22f49d897d55b20858d41da8e4727e62 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 11 Jul 2016 10:56:08 -0700 Subject: [PATCH] Try adding newrelic logging --- packages/nylas-api/app.js | 2 ++ packages/nylas-api/newrelic.js | 24 ++++++++++++++++++++++++ packages/nylas-sync/app.js | 1 + packages/nylas-sync/newrelic.js | 24 ++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 packages/nylas-api/newrelic.js create mode 100644 packages/nylas-sync/newrelic.js diff --git a/packages/nylas-api/app.js b/packages/nylas-api/app.js index bca30c9af..8fab0cd2e 100644 --- a/packages/nylas-api/app.js +++ b/packages/nylas-api/app.js @@ -1,3 +1,5 @@ +require('newrelic'); + const Hapi = require('hapi'); const HapiSwagger = require('hapi-swagger'); const HapiBoom = require('hapi-boom-decorators') diff --git a/packages/nylas-api/newrelic.js b/packages/nylas-api/newrelic.js new file mode 100644 index 000000000..00882097e --- /dev/null +++ b/packages/nylas-api/newrelic.js @@ -0,0 +1,24 @@ +/** + * New Relic agent configuration. + * + * See lib/config.defaults.js in the agent distribution for a more complete + * description of configuration variables and their potential values. + */ +exports.config = { + /** + * Array of application names. + */ + app_name: ['Nylas K2 API'], + /** + * Your New Relic license key. + */ + license_key: 'e232d6ccc786bd87aa72b86782439710162e3739', + logging: { + /** + * Level at which to log. 'trace' is most useful to New Relic when diagnosing + * issues with the agent, 'info' and higher will impose the least overhead on + * production applications. + */ + level: 'info', + }, +} diff --git a/packages/nylas-sync/app.js b/packages/nylas-sync/app.js index 5d7319245..227e7a365 100644 --- a/packages/nylas-sync/app.js +++ b/packages/nylas-sync/app.js @@ -1,3 +1,4 @@ +require('newrelic'); global.Promise = require('bluebird'); const {DatabaseConnector} = require(`nylas-core`) diff --git a/packages/nylas-sync/newrelic.js b/packages/nylas-sync/newrelic.js new file mode 100644 index 000000000..a85120e87 --- /dev/null +++ b/packages/nylas-sync/newrelic.js @@ -0,0 +1,24 @@ +/** + * New Relic agent configuration. + * + * See lib/config.defaults.js in the agent distribution for a more complete + * description of configuration variables and their potential values. + */ +exports.config = { + /** + * Array of application names. + */ + app_name: ['Nylas K2 Sync'], + /** + * Your New Relic license key. + */ + license_key: 'e232d6ccc786bd87aa72b86782439710162e3739', + logging: { + /** + * Level at which to log. 'trace' is most useful to New Relic when diagnosing + * issues with the agent, 'info' and higher will impose the least overhead on + * production applications. + */ + level: 'info', + }, +}