Saturday, 22 February 2020

Catch Error in Power Apps and App Insight Logging

Error Handling:
App Insights logging:  Replaced as Microsoft have built in telemetery as of 3 Feb 2020.

Example Error capturing and tracing to Azure AppInsights
IfError( // Perform API Call , // Fallback so log here!
Trace("Pauls Unique PowerApp",TraceSeverity.Error, {UserName:User().Email,
Role:gblRole, ErrorMsg:ErrorInfo.Message, ErrorControl:ErrorInfo.Control,
Notify("Err message ..." & ErrorInfo.Message); // Display the error on the UI (remove before production release  );
To Review your App Insights Logging:
Open you Azure Portal > Open your App Insights blade >
Click the "Search" navigation option > Free text entry e.g. "Loyalty PowerApp"
App Insights, finding Traces generated in Power Apps

Monitoring Tool within Power Apps

The Monitor tool in Power Apps is great for debugging and tracing.
Start a monitor on the open Power App.

Monitor Tool - Showing a GET via a custom Connector and the returned response


Post a Comment