Skip to content

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

node-newrelic examples

This directory contains examples of using the New Relic Node.js agent. You can run them by copying them into a new directory that contains a newrelic.js configuration file, like this:

$ mkdir node-newrelic-examples
$ cd node-newrelic-examples
$ npm i newrelic
$ cp node_modules/newrelic/newrelic.js .
$ # edit newrelic.js with your configuration details, like app name
$ wget https://raw.githubusercontent.com/newrelic/node-newrelic/main/examples/api/background-transactions/example1-basic.js
$ node example1-basic.js

Metrics generated by the examples will then show up in your New Relic One interface.

To request additional examples, please file an issue!