This is really a quick-win for all of you using canvas apps. In a matter of minutes you will get this up and running. To start, you will need to get an Azure Application Insights Resource in the Azure Portal. When you get this in order, it’s time to find your instrumentation key to get the magic working.

You obtained your instrumentation key? Great! Lets hook things up in our canvas app. Go to the maker portal and open the canvas app you wish to log telemetry. Go to the app object and the properties pane on the right side should show a property instrumentation key. Paste your key in there, save and publish your app. You’re done! Launch your app and perform some actions. You will see telemetry within minutes. All out of the box!

Of course you can add custom traces to your application. Let’s take a look on how we do this:

Trace(“App Feedback”,TraceSeverity.Information,{UserName: User().FullName, UserEmail: User().Email, Screen: Parent.FeedbackScreen, FeedBackValue:”1″});

trace function example

Let’s explain this a little bit. The app feedback is the trace message where we will be able to filter it. The trace severity is an enumeration (predefined value) to set the level, e.g. information, warning, error, … The last option in the trace function is the information passed. This is json syntax and can contain anything that seems useful to be logged.

Extend this functionality with the capabilities of the Azure Application Insights like alerts and monitoring, you really have a very powerful solution to govern your canvas app.