Skip to content

rakis/artsy-newrelic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

artsy-newrelic

Plug-and-play NewRelic module wrapper configured for Artsy Node apps.

Example

Require above your app instance, and mount the middleware.

var newrelic = require('artsy-newrelic');
var app = express();
app.use(newrelic);

Add browser-side detection

head
  != newRelicHead

Use env vars to configure (values are defaults)

NEW_RELIC_LICENSE_KEY=
NEW_RELIC_APP_NAME=process.env.APP_NAME
NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERROR_CODES=400,401,402,[...],499

Leave NEW_RELIC_LICENSE_KEY out in dev/test environments and NewRelic won't bother you.

Testing

Create a .env file in the root of this project with NEW_RELIC_LICENSE_KEY and APP_NAME set. Run npm run example and check your NewRelic panel to see it integrate.

License

MIT

About

Plug-and-play NewRelic module wrapper configured for Artsy Node apps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.6%
  • HTML 2.4%