Application Insights - Dependency tracking and duration

Victor Rubio 40 Reputation points
2023-06-07T11:40:05.5933333+00:00

When tracking dependencies on Application Insights, does the duration displayed take into account the time it takes to connect to the resource or just the time it takes to make the request and get the response back?

For example, when tracking a SQL DB query dependency, the connection to the DB takes 100ms and the query 200ms. Will the dependency display a duration of 200ms or 300ms?

Thanks a lot

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,626 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 30,276 Reputation points Microsoft Employee Moderator
    2023-06-29T20:14:41.57+00:00

    Application Insights tracks dependencies by instrumenting the code that makes the call to said dependency. In short, it captures the start and end times of the call; therefore, the duration is cumulative.

    In your example above, the 300-millisecond duration will include the time it takes to connect to the database, execute the query, and send the results back. This holds true for other dependencies as well, e.g. HTTP services, or other Azure Services.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.