Search code examples
azure-cognitive-search

Execution time/metrics data for search queries in Azure Search


Is there a way query and get execution time/metrics for search queries when making a call to Azure Search.

We are looking to log execution times in our app code when each call is made.

Thanks!


Solution

  • You should be able to make use of the documentation on this page: https://learn.microsoft.com/en-us/azure/search/search-monitor-usage to leverage some of the fundamental latency related metrics that Azure search tracks.

    In addition, to find out how much time Azure search took to process any particular request, you'll find the elapsed-time header useful. Note that it doesn't include network latency, which you might have to factor in yourself.

    If you want to go above and beyond and add analytics for better insights, I'd point you to the Search Traffic Analytics page