Hands On with Azure App Insight

Monitor your apps!

Bervianto Leo Pratama
3 min readFeb 21, 2021
Photo by Stephen Phillips - Hostreviews.co.uk on Unsplash

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

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

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!

Easy setup!

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

services.AddApplicationInsightsTelemetry();

Check your apps

I assume you know how to deploy the Web Apps. After finished deploy, visit this link: https://<your_app_name>.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.

--

--

Bervianto Leo Pratama
Bervianto Leo Pratama

Written by Bervianto Leo Pratama

Software Engineer | AWS Community Builder | HashiCorp Ambassador | Focus on Microservices and Cloud Computing

No responses yet