mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 11:46:23 +00:00
chore(newrelic): add newrelic
This commit is contained in:
parent
3660f1a85c
commit
5b06392879
5 changed files with 31 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,6 +8,7 @@ npm-debug.log
|
|||
lib
|
||||
public/bower_components
|
||||
build
|
||||
newrelic_agent.log
|
||||
|
||||
src/*/*.map
|
||||
src/*/*/*.map
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ Gruntfile.js
|
|||
CHANGELOG.md
|
||||
.idea*
|
||||
.git*
|
||||
newrelic_agent.log
|
||||
|
|
|
|||
25
newrelic.js
Normal file
25
newrelic.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
var nconf = require('nconf')
|
||||
exports.config = {
|
||||
/**
|
||||
* Array of application names.
|
||||
*/
|
||||
app_name : ['HabitRPG'],
|
||||
/**
|
||||
* Your New Relic license key.
|
||||
*/
|
||||
license_key : nconf.get('NEWRELIC'),
|
||||
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 : 'trace'
|
||||
}
|
||||
};
|
||||
|
|
@ -43,7 +43,8 @@
|
|||
"domain-middleware": "~0.1.0",
|
||||
"swagger-node-express": "git://github.com/lefnire/swagger-node-express#habitrpg",
|
||||
"passport": "~0.1.18",
|
||||
"passport-facebook": "~1.0.2"
|
||||
"passport-facebook": "~1.0.2",
|
||||
"newrelic": "~1.3.0"
|
||||
},
|
||||
"private": true,
|
||||
"subdomain": "habitrpg",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ var server;
|
|||
|
||||
// ------------ Setup configurations ------------
|
||||
utils.setupConfig();
|
||||
if (nconf.get('NODE_ENV') === 'production')
|
||||
require('newrelic');
|
||||
|
||||
// ------------ MongoDB Configuration ------------
|
||||
mongoose = require('mongoose');
|
||||
|
|
|
|||
Loading…
Reference in a new issue