Source: levelup.gitconnected.com

Integrating New Relic APM with UWSGI

Category: Database

An APM (Application Performance Management) is used to monitor and manage the performance and availability of software applications. You can use it to figure out things like — time taken by an API, the time taken to run a database query, the time taken to run a function, etc.

Here you can define your environments like this: Here, production-app is what you will pass to your UWSGI config as the environment variable NEW_RELIC_ENVIRONMENTapp_name is the name by which you will see your application in the New Relic APM dashboard and monitor_mode indicates whether New Relic will send the data about your app to the New Relic collector. Now that you are done with the New Relic configuration it’s time to make changes to your UWSGI config.

In the Environment option, you need to define two environment variables as done in the above config file: In the ExecStart option, you just need to prepend your UWSGI command with the newrelic-admin run-program

Related Articles