How to run new relic command on koyeb to enable infrastructure and logs metrics

I want add new relic to my fastapi in koyeb I tried to use console but it keeps throwing sudo error. how can I implement this


How are you installing newrelic? From what I understand of your message, you are trying to run pip install newrelic from a shell on your instance.

You should instead update your requirements.txt file and add newrelic in it.

If my message doesn’t help, can you please provide:

  • a screenshot of the error
  • explain how do you package your application?


1 Like

Thank you for your response I already have new relic in my requirements.txt and it works partially at the moment so basically there are 2 things you have to do

  1. Adding the new relic file and adding the build command in koyeb [I already did this successfully]
NEW_RELIC_CONFIG_FILE=newrelic. ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS
  1. this is where I am stuck as it requires me to download the cli on the host but I do not know how to … I tried “Console” but no luck