Search code examples
node.jsherokunewrelic

Why is NewRelic not receiving any data from my Heroku app?


I'm running this Node app on Heroku.

I've gone through the following steps:

  1. Added the add-on to my application. Heroku added two env vars to my app, NEW_RELIC_LICENSE_KEY and NEW_RELIC_LOG. I added third one, NEW_RELIC_APP_NAME.

  2. Followed the instructions in the Heroku Dev Center and installed the newrelic module:

    npm install newrelic --save
    
  3. Committed and pushed the resulting change to package.json.

(I've skipped copying newrelic.js to the root because NewRelic does not mention it in their Heroku-specific docs and Heroku doesn't either.)

I still see no data in NewRelic. What am I missing?


Solution

  • Turns out: Yes, I did need to copy newrelic.js and a change the server.js to require('newrelic') (see commit here).