Ali Shahzad
Ali Shahzad

Reputation: 5332

Azure get APIs response time

I have an ASP.NET WebApi project deployed on Azure, and I am looking for a report/analytics that tells me the response times of the APIs/services. I want to identify the slow APIs. Is there any kind of reporting in Azure that identifies the response times of APIs or the slow APIs? Any help would be appreciated.

Upvotes: 1

Views: 854

Answers (2)

Janley Zhang
Janley Zhang

Reputation: 1577

how can I debug on Azure? Please guide.

  1. In publish settings>choose debug mode to publish your webapi project to Azure. Then visit the api method to trigger app insights.

enter image description here

  1. In Server Explorer in Visual Studio, right click web app name>choose attach debugger. You could refer to this article.

enter image description here

The result in app insight in Azure web app:

enter image description here

I don't want to change my production app to run in debug mode

You could also use Stopwatch class to measure the response time in web api method. Please refer to this article.

Upvotes: 1

Martin Brandl
Martin Brandl

Reputation: 58931

You are looking for Application Insights. Read Find and diagnose performance issues with Azure Application Insights

Here is the link to enable Application Insights in an ASP.NET Web Application.

Upvotes: 2

Related Questions