npm install newrelic --save
cp node_modules/newrelic/newrelic.js .
vim newrelic.js
# Change:
app_name: ['Your application name here...'],
license_key: 'license key here'
require('newrelic');
// Done!
var nr = require('newrelic');
// This is automatic for hapi, express, restify...
nr.setTransactionName(name);
nr.setControllerName(name, [action]);
// Automatic for mongo/mysql/redis
nr.createBackgroundTransaction(name, [group], handle);
nr.endTransaction();
// Custom metrics!
nr.recordMetric(name, value);
nr.incrementMetric(name, [amount]);