DEV Community

Bervianto Leo Pratama
Bervianto Leo Pratama

Posted on • Originally published at berviantoleo.Medium on

Hands On with Azure App Insight

Monitor your apps!

Photo by Stephen Phillips - Hostreviews.co.uk on Unsplash

If you want to know more Azure App Insight, please visit the documentation here.

What is Azure Application Insights? - Azure Monitor

Why I write this? Yeah, to remember what I’ve learned. This article only summary from this module.

Instrument server-side web application code with Application Insights - Learn

Note: Hemm… Because some features from Azure very quick to changes, somehow the guide from that module not relevant again. This article also maybe not relevant after some months!

Step by Step

Prepare your apps!

In this article, we use NetCore. So we can install the library Microsoft.ApplicationInsights.AspNetCore

The repositories come from here, you also can deploy from there!

bervProject/NETCoreAPIBoilerplate

Easy setup!

I just add this one line to ConfigureServices after install the library/nuget

services.AddApplicationInsightsTelemetry();
Enter fullscreen mode Exit fullscreen mode

Check your apps

I assume you know how to deploy the Web Apps. After finished deploy, visit this link: https://.azurewebsites.net/api/v1.0/WeatherForecast.

Example Visit

In that link, we also trigger the app insight event.

Some note:

Because Azure will not track Free/Shared plan, please make sure your AppServicePlan is Basic or more. Sadly, the sandbox not allowed it (when I try the sandbox from that module). :(

Visit your App Insight

In my case, I still need to turn on the App Insight to Recommended (previously Basic), don’t forget to turn on the Profiler.

Application Insight (enabled)

Application Insight Dashboard

You can check to Investigate > Transaction Search for more information about your previous custom event.

In my side, will looks like this.

Application Insight (Transaction Search)

Congrats!

Photo by Eilis Garvey on Unsplash

Yeah! You’re setup it correctly. Anyway, if you still confused. You can visit the module for the basic knowledge. I know some steps is outdate!

My Videos

Clean Up!

Don’t forget always to clean up your resource whenever you don’t need it again.

Top comments (0)