Thursday, August 5, 2021

Application Insights - Transaction trend over time and analyze further

This article is related to the previous one I wrote about Application Insights - Investigate performance

From the previous article, I explained how to investigate performance of a specific operation and monitor end-to-end transaction. I will continue where I stopped and I will use the same operation to illustrate.

In order to access the trend of specific request over the time, need to click on following link












It will load events chart as below. In order to properly identify a pattern I will select last 48 hours history. You can observe that there is a peak starting from 1.30PM and gradually reducing everyday










We can further analyze the same chart by splitting each bar with other parameters. As an example I use Performance parameter to split bars.












I'll Zoom into a specific area. You can see there are some calls which took around 1-3 seconds (Shown in green color) 




I will split bars with another parameter. This time I'll use Country or Region

Tuesday, August 3, 2021

Azure Application Insights - Investigate Performance

Azure Application Insights provide great features to dig deep into application calls. We can identify performance issues and areas for improvements by working with given insights. 

I investigated performance of a live application using this feature, and I'll guide you through the process using this article.

Following are the steps I used to analyze an operation

1. Navigate to Application Insights instance and click on Application Map. Select a call that you need to analyze further












2. Click on Investigate Performance button. It'll show API calls in a time series. From the below image we can see that highest time consuming operation is /connect/token.












By clicking on connect/token operation, we can further analyze it. Distribution of duration graph will scope to selected operation and you can see it in the top right side. Since there are some calls which took more than 500ms, we can select that time range to further study.













3. Click on the samples button to see actual calls and dependencies















4. It'll load samples and we can select specific sample to analyze














By looking at the call stack, we can see there are around 30 separate calls to a specific SQL Server instance from this single operation.

There may be an opportunity to optimize further. May be we can reduce some calls if they are duplicate by a developer mistake. Or we might combine few calls together and send via a single operation.

Sunday, August 1, 2021

Azure Application Insights - Debug API failures to database level using Application Map

Application Insights is a rich Application Performance Management (APM) feature provided in Microsoft Azure to monitor live applications. It allows you to evaluate real time analytics of your applications

Following are the key options provided.


 









Application Map

Application map allows you to check interactions among your application components and to drill down to any failures or performance concerns. In this post I'll summarize how to see API failures and drill down to a specific issue.

I have a live application which is hosted in Azure and I've configured it for Application Insights. Following is the component interaction map of my application.






















Some arrows are colored in red, where those are the items we need to focus on.

I thought of drilling further into one specific interaction. You can do it by clicking on a information title embedded in an arrow (in this instance I clicked on the point with 702ms | 0.1%)

  • Average response time is 702ms
  • Failure percentage is 0.1%













This will open up a summary with failures, which I'm concerned about. I can see there are 2, 547 error instances. Lets dive deeper. In order to further debug, let's click on Investigate failures button.








In this view I can see when those erroneous transactions occur in a timeline and in the next tab I can see overall failures where I can further drilldown by clicking on the error instances. Here, I have to click on the number 2. It'll open up another blade where it shows the error description









Now click on the blue arrow to see further details

Now click on [show more] to see the detailed error message
By using the Application Map feature, we can drill down to the database level to debug issues