Skip to content

Commit 06243ed

Browse files
committedDec 15, 2017
setup newrelic
Signed-off-by: Arnav Gupta <arnav@codingblocks.com>
1 parent 6f31ab4 commit 06243ed

File tree

5 files changed

+159
-1
lines changed

5 files changed

+159
-1
lines changed
 

Diff for: ‎config.js

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ switch (config.DEPLOY_CONFIG) {
4242
}
4343

4444
config.SENTRY_DSN = process.env.SENTRY_DSN || config.secrets.SENTRY_DSN
45+
config.NEW_RELIC_LICENSE_KEY = process.env.NEW_RELIC_LICENSE_KEY || config.secrets.NEW_RELIC_LICENSE_KEY
4546

4647

4748
exports = module.exports = config

Diff for: ‎newrelic.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
'use strict'
2+
/**
3+
* New Relic agent configuration.
4+
*
5+
* See lib/config.defaults.js in the agent distribution for a more complete
6+
* description of configuration variables and their potential values.
7+
*/
8+
const config = require('./config')
9+
exports.config = {
10+
/**
11+
* Array of application names.
12+
*/
13+
app_name: ['schedulecture'],
14+
/**
15+
* Your New Relic license key.
16+
*/
17+
license_key: config.NEW_RELIC_LICENSE_KEY,
18+
logging: {
19+
/**
20+
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
21+
* issues with the agent, 'info' and higher will impose the least overhead on
22+
* production applications.
23+
*/
24+
level: (config.DEPLOY_CONFIG === 'production')
25+
? 'info'
26+
: 'trace'
27+
}
28+
}

Diff for: ‎package-lock.json

+126
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"bower": "^1.8.2",
99
"cookie-parser": "^1.4.3",
1010
"express": "^4.16.2",
11+
"newrelic": "^2.4.2",
1112
"parse-database-url": "^0.3.0",
1213
"passport": "^0.4.0",
1314
"passport-http-bearer": "^1.0.1",

Diff for: ‎secrets-sample.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
"ONEAUTH": {
1111
"CLIENT_ID": "8473906170",
1212
"CLIENT_SECRET": "CwgBS7nr90EFyLF7u3TGPnwRHhhNt4MU57BbgJESEldSPiN2azHHaqvwHPpTVrfB"
13-
}
13+
},
14+
"SENTRY_DSN": "< your sentry dsn url >",
15+
"NEW_RELIC_LICENSE_KEY": "< your new relic license key >"
1416
}

0 commit comments

Comments
 (0)
Please sign in to comment.