APM Tips

Glossary

Dependency

A call an app makes to something outside it, such as an HTTP API, a database, a queue or a cache, recorded in the dependencies table with its target, duration and result.

Updated

A slow request is often a request waiting on something else, and its dependency rows say what. Each row carries type (HTTP, SQL and so on), target (the host or server called), name, duration, resultCode and success, plus the operation_Id of the request that made the call. Application Map uses them to draw the calls from each role to its targets.

In OpenTelemetry terms a dependency is any span that isn’t a server span. Microsoft’s migration glossary maps Application Insights requests to server spans, and dependencies to the other span kinds (client, internal and so on). The classic .NET SDK and the Application Insights Agent collect HTTP calls, SQL commands and Azure SDK calls without code changes; the distros do it through instrumentation libraries.

Dependencies are often the biggest table, too. A request that makes 20 database calls writes 21 rows before it logs anything. This query counts calls and failures per target, weighted for sampling:

dependencies
| where timestamp > ago(1d)
| summarize calls = sum(itemCount), failed = sumif(itemCount, tostring(success) =~ "false") by type, target
| order by failed desc

One known issue to plan around: Microsoft lists the operation name as missing from dependency telemetry sent by the OpenTelemetry exporters, so operation_Name can be empty on those rows. Group by the calling request through operation_Id instead.

Sources, checked

  1. Migrate from Application Insights SDKs to OpenTelemetry (terminology)learn.microsoft.com · checked
  2. Application Insights API for custom events and metrics (Classic API)learn.microsoft.com · checked
  3. Troubleshoot OpenTelemetry issues in .NET (known issues)learn.microsoft.com · checked

All glossary terms