Node.js +

New Relic

Four steps:

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'

Finally:

require('newrelic');

// Done!

Bonus:

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]);

Node.js +NewRelic

By Espen Hovlandsdal

Node.js +NewRelic

  • 1,287