Hi, chaps. In this post, I will describe how you can use Azure App Insights to monitor and provide diagnostics about your Canvas app.
Connect your Power App to Azure App Insights
In the following steps, you will learn how to configure it in one of the Canvas apps.
Create an Application Insights Resource in the Azure Portal
Go to https://portal.azure.com, search for Application Insights, fill out the required fields, and click Review + Create.
Copy the Instrumentation Key to connect your Canvas Apps to App Insights from the App Insight resource.
Connect PowerApps Canvas Apps with Application Insights
Visit https://make.powerapps.com and select Apps from the left menu. Right-click on your app and select ‘Edit.’
Paste the instrumentation key into the instrumentation key field below by clicking on the App icon in the left-hand navigation.
Next, on the top right menu, choose to Publish the app. App Insights will collect telemetry data from your application.
Access Telemetry data in Azure Application Insights
The following video demonstrates how to access telemetry from Azure Application Insights.
Keep track of unhandled errors
Microsoft has introduced two experimental features that allow you to get runtime errors directly from the canvas app to Azure App Insights. To activate those two features from the menu choose Updates, navigate to the Experimental tab, and toggle on the two features: Pass errors to Azure Application Insights and Enable Azure Application Insights correlation tracing.
Pass errors to Azure Application Insights
Unhandled errors from the canvas app that are bannered to users can now be sent to App Insights in addition to being stored in entity Trace.
Read more details about this feature in : Monitor unhandled errors (experimental)
Enable Azure Application Insights correlation tracing.
Correlation tracing distributes context information to associate generated system logs from a canvas app and it’s connections, such as Azure API Management, Azure function, or REST API’s.
There are two limitations on this feature:
- HTTP requests are recorded in Azure App Insights if the connected service is linked as well to Azure App Insights
- Correlation tracing is only applicable to custom connectors; other connector types are not supported.
Read more details about this feature in : Correlation tracing (experimental)
Related links
- Trace function
- Diagnose exceptions in web apps with Application Insights
- Analyze system-generated logs using Application Insights