How to Use Application Insights (App Insights) with APIM

Leave a comment
BEFORE WE START, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

In our previous post, we showed how to setup and use API Management (APIM) in the Microsoft Azure Portal. Now that APIM is set up, let’s add Application Insights to monitor the usage of these APIs.

Application Insights, or App Insights, or an Azure service that can be used to provide detailed monitoring and reporting of your application. Let’s set it up with our test APIM app.

Log into https://portal.azure.com/ and search for Application Insights:

Click Add:

Enter a resource group, name and region and click Review + Create:

And then Create:

You will see Your Deployment is Underway:

And then Complete:

Now let’s link it to our APIM. Open the APIM in Azure and from the left menu select Application Insights:

Click Add:

Select the App Insights we just created from the list and click Create:

Now browse out to the API by selecting APIs. We will select our Demo Conference API. Click on the Settings tab and scroll down to Diagnostic Logs. From here, check Enable, then select the App Insights we created. Set the Sampling to 100 and check Always log errors. Click Save:

Now let’s send a request and watch it be logged by our App Insights. Go to the Test tab and click GetSessions, then Send:

This returns a list of Sessions:

Now, on our App Insights, we server requests coming through:

Click on the Live Metrics Stream:

Before sending a request, you will see the Incoming Requests as blank:

On sending the same GetSessions request, we see it come in:

App Insights has more capabilities that we will go into in later posts.

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

See more articles on: Azure

Leave a Reply

Your email address will not be published. Required fields are marked *