Socket
Socket
Sign inDemoInstall

artsy-newrelic

Package Overview
Dependencies
42
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    artsy-newrelic

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


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Install size
11.9 MB
Created
Weekly downloads
 

Readme

Source

artsy-newrelic

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

  • Middleware to inject browser monitoring
  • Report uncaught exceptions
  • No-op when the NEW_RELIC_LICENSE_KEY environment variable is omitted
  • Timeout after 30 seconds and report the timeout

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

FAQs

Last updated on 28 Sep 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc