Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A dependency is a component that's called by your application. It's typically a service called by using HTTP, a database, or a file system. Application Insights measures the duration of dependency calls and whether it's failing or not, and collects information like the name of the dependency. You can investigate specific dependency calls and correlate them to requests and exceptions.
Automatically tracked dependencies
This section links to lists of dependency calls that are automatically detected as dependencies without requiring any additional modification to your application's code. These dependencies are visualized in the Application Insights Application map and Transaction diagnostics views.
If your dependency isn't on the list, you can still track it manually, see Manually track dependencies.
For a list of all autocollected dependencies, see the language-specific tabs in Add and modify Azure Monitor OpenTelemetry for .NET, Java, Node.js, and Python applications.
How does automatic dependency monitoring work?
Dependencies are automatically collected using one of the following techniques, depending on the telemetry collection method.
OpenTelemetry instrumentation libraries are used to automatically collect dependencies such as HTTP, SQL, and Azure SDK calls. These libraries hook into supported frameworks and client libraries using
DiagnosticSource
or equivalent mechanisms.In supported environments like Azure App Services, autoinstrumentation is available and enabled by default, injecting telemetry collectors at runtime without code changes.
In other environments, developers can manually configure instrumentation using the Azure.Monitor.OpenTelemetry.* packages and OpenTelemetry APIs to control which dependencies are tracked and how they're enriched or filtered.
Manually track dependencies
You can manually track dependencies when automatic collection doesn't meet your needs.
Tip
For new projects, we recommend using OpenTelemetry for better flexibility and future compatibility.
To learn how to manually track dependencies, see Add and modify Azure Monitor OpenTelemetry for .NET, Java, Node.js, and Python applications.
Where to find dependency data
The following tools and views in Application Insights make it easy to explore and analyze dependency telemetry:
Views | Description |
---|---|
Application Map | Offers a visual representation of your application's dependencies and their relationships with external services. |
Transaction Diagnostics | Displays end-to-end transaction details, correlating server-side operations with dependency calls. |
Browser tab in failures and performance views | Highlights AJAX calls from client browsers. |
Server tab in failures and performance views | Lets you drill into slow or failed server requests and inspect related dependency calls. See examples for trace from requests to dependencies and failed requests associated with failed calls to dependencies. |
Azure Monitor Logs | Enables advanced querying and analytics on dependency telemetry. See examples to track dependencies using KQL. |
Diagnose slow requests
Each request event is associated with the dependency calls, exceptions, and other events tracked while processing the request. So, if some requests are doing badly, you can find out whether it's because of slow responses from a dependency.
Trace from requests to dependencies
Select the left-hand Performance tab and select the Dependencies tab at the top.
Select a Dependency Name under Overall. After you select a dependency, it shows a graph of that dependency's distribution of durations.
Select the Samples button at the bottom right. Then select a sample to see the end-to-end transaction details.
Profile your live site
The .NET Profiler traces HTTP calls to your live site and shows you the functions in your code that took the longest time.
Failed requests
Failed requests might also be associated with failed calls to dependencies.
Select the left-hand Failures tab and then select the Dependencies tab at the top.
Here you see the failed dependency count. To get more information about a failed occurrence, select a Dependency Name in the bottom table. Select the Dependencies button at the bottom right to see the end-to-end transaction details.
Logs (Analytics)
You can track dependencies in the Kusto query language. Here are some examples.
Find any failed dependency calls:
dependencies | where success != "True" | take 10
Find AJAX calls:
dependencies | where client_Type == "Browser" | take 10
Find dependency calls associated with requests:
dependencies | where timestamp > ago(1d) and client_Type != "Browser" | join (requests | where timestamp > ago(1d)) on operation_Id
Find AJAX calls associated with page views:
dependencies | where timestamp > ago(1d) and client_Type == "Browser" | join (browserTimings | where timestamp > ago(1d)) on operation_Id
Open-source SDK
Like every Application Insights SDK, the dependency collection module is also open source. Read and contribute to the code or report issues at the official GitHub repo.
Next steps
- Review frequently asked questions in our Dependency tracking FAQ.
- See the data model for Application Insights.
- Check out platforms supported by Application Insights.