Permalink
Browse files

#33 Add New Relic to performance monitor Node

  • Loading branch information...
simison committed Nov 17, 2014
1 parent 6ae7806 commit 86c734278760f09fb62881c897b03b336642cef0
Showing with 46 additions and 3 deletions.
  1. +5 −0 config/env/development.js
  2. +5 −0 config/env/production.js
  3. +1 −1 config/init.js
  4. +5 −0 config/secret/_template.js
  5. +22 −0 newrelic.js
  6. +1 −0 package.json
  7. +7 −2 server.js
@@ -112,5 +112,10 @@ module.exports = {
pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD'
}
}
},
newrelic: {
app_name: process.env.NEWRELIC_APP || ['Trustroots'],
license_key: process.env.NEWRELIC_KEY || 'NEWRELIC_KEY',
logging_level: process.env.NEWRELIC_LOGGING_LEVEL || 'info',
}
};
@@ -86,5 +86,10 @@ module.exports = {
pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD'
}
}
},
newrelic: {
app_name: process.env.NEWRELIC_APP || ['Trustroots'],
license_key: process.env.NEWRELIC_KEY || 'NEWRELIC_KEY',
logging_level: process.env.NEWRELIC_LOGGING_LEVEL || 'info',
}
};
@@ -37,4 +37,4 @@ module.exports = function() {
require.extensions['.server.controller.js'] = require.extensions['.js'];
require.extensions['.server.model.js'] = require.extensions['.js'];
require.extensions['.server.routes.js'] = require.extensions['.js'];
};
};
@@ -56,5 +56,10 @@ module.exports = {
pass: 'MAILER_PASSWORD'
}
}
},
newrelic: {
app_name: ['Trustroots'],
license_key: 'NEWRELIC_KEY',
logging_level: 'info'
}
};
@@ -0,0 +1,22 @@
/**
* New Relic agent configuration.
* @link https://www.newrelic.com
*
* See ./node_modules/newrelic/lib/config.defaults.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*/

var config = require('./config/config');

exports.config = {
app_name : config.newrelic.app_name, // Array of application names
license_key : config.newrelic.license_key,
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 : config.newrelic.logging_level
}
};
@@ -35,6 +35,7 @@
"method-override": "~2.3.0",
"mongoose": "~3.8.19",
"morgan": "~1.5.0",
"newrelic": "^1.13.3",
"nodemailer": "~1.3.0",
"passport": "~0.2.1",
"passport-facebook": "~1.0.3",
@@ -1,10 +1,15 @@
'use strict';

/**
* Module dependencies.
*/
if(process.env.NODE_ENV === 'production') {
var newrelic = require('newrelic');
}

var init = require('./config/init')(),
config = require('./config/config'),
mongoose = require('mongoose');
config = require('./config/config'),
mongoose = require('mongoose');

/**
* Main application entry file.

0 comments on commit 86c7342

Please sign in to comment.