Hello World sample
The purpose of this repo is to demonstrate how easy it is begin instrumentation with New Relic and Node js.
node indexNodeAgentInstall.js
Operating systems
- Linux
- SmartOS
- macOS 10.7 and higher
- Windows Server 2008 and higher
npm install newrelic --save
From node_modules/newrelic, copy newrelic.js into the root directory of your app.
In newrelic.js, add an application name that will appear on the New Relic console and the New Relic license key for access. See Locate New Relic license key for instructions.
Add require('newrelic'); as the first line of your app's main module.
node indexNodeAgentInstall.js
Please note that the application will display in New Relic. No statistics will be captured due to zero load from the sample application.
See Install Node.js on New Relic for detailed installation instructions.
node indexCustomAttributes.js
Please note that the same application will display in New Relic. No statistics will be captured due to zero load from the sample application. Its purpose is to give you an indication of how to make the call.
See Add custom attributes to objects for detailed instructions.