Microsoft Azure offers two platform services that manage your web or containerized apps. You can install the Python agent on both Microsoft Azure App Service and Azure Container Apps, letting you track your Azure-managed Python apps in New Relic.
Alternative Approaches
If you are looking for a way to integrate New Relic into your Azure hosted application without modifying your application code, this tutorial provides that solution.
Compatibility and requirements
Before you install the Python agent, we recommend:
- Reviewing the Python agent's compatibility and requirements doc
- Setting up a Python app on one (or both!) of the Azure managed platforms
- Installing the Azure CLI in your environment
Info
Keep in mind that the Python agent doesn't capture telemetry for Azure Functions without our integration. We recommend installing the Azure Functions monitoring integration if you'd like to collect data about Azure Functions.
Install the Python agent onto Azure App Service or Container Apps
Add the Python agent to your Azure application
To add the New Relic Python agent to your Azure application, add newrelic
to your requirements.txt
file:
$foo@bar:~$ cat requirements.txt $newrelic$flask
Initialize the agent
The agent can be initialized either by manually initializing the app itself or by adding a New Relic entrypoint in the Dockerfile:
Configure your Azure settings
Once you've installed the Python agent, we recommend configuring your app in either the Azure App Service or Container Apps portal, depending on the service you're using. You can update your app settings through the Azure UI, or using the Python CLI.
What's next?
Now that you're collecting data from your Azure-managed Python apps, you can:
- Check out our docs to learn how to query your New Relic data.
- Learn how to create your first alert.
- You can get started with dashboards to learn how to build tailored visualizations about your environment.