Newly defined applications not showing up in Web UI [Heroku/Python]

Please paste the permalink to the page in question below:

Please share your agent version and other relevant versions below:

requirements.txt: newrelic== runtime.txt: python-3.4.3

Please share your question/describe your issue below. Include any screenshots that may help us understand your question:

We deployed an application on Heroku using the official Python buildpack. After having used New Relic for our web dyno for a while already, we now wanted to use it for our two background workers, too. I edited the Procfile as follows:

web: PYTHONPATH=. newrelic-admin run-program gunicorn --max-requests 50 --max-requests-jitter 5 --log-file=- api:app
worker_high: PYTHONPATH=. NEW_RELIC_APP_NAME="Worker High" newrelic-admin run-python high
worker_low: PYTHONPATH=. NEW_RELIC_APP_NAME="Worker Low" newrelic-admin run-python low

Before worker_* would simply run the python command directly.

The APM Web UI only reports the web dyno with the app_name defined in the newrelic.ini, and even after several restarts / deploys the data for the two workers is not showing up as expected. The idea is to have the data reported separately.

  1. Are there any other steps required to declare new applications in New Relic?
  2. Can these background workers not be tracked using New Relic?
  3. We can use the same NewRelic license key for the workers, too? Or is that some sort of limitation and it silently fails?

Thanks a lot, thankful for any input!

Have a good day, Leo

Hi there @leonhard.melzer Thanks for reaching out with all these details.

It looks like you are running two worker scripts (, but because they are not built with a standard and supported web framework, they fall under the use-case we call Background Tasks.

The Python agent has the capability to monitor any script, like these workers, with just a bit of additional instrumentation. You can use our @newrelic.agent.background_task() decorator to point the agent to which functions in the file should be reported on.

Follow along with the Background Tasks documentation and report back here if you run into additional snags!

Thanks a lot, @agoetz!

This pointed me in the right direction: our worker uses rq hence is affected by the specific implementation and the difficulty to capture data in this setup.

For reference, this is discussed here: Feature Idea: RQ and Introspection on Tasks

@agoetz, could you maybe send us information through a ticket about this unsupported workaround and we’ll evaluate if it works for us? Thanks a lot.

Hi @agoetz,
Thanks for taking the time to reply. Could you get a ticket opened for us to explain the (unsupported) workaround? I also posted in the linked topic on rq integration but got no reply so far. Thanks a lot!


Hi @leonhard.melzer - I’ve opened a support ticket for you. Please watch your email for the the ticket details.

1 Like

Thanks @sread, that worked out! Have a good day.

1 Like