Overview
Distributed AI systems fail in pieces — the API returns 500 because a dependency timed out three hops away. Trace data lets you reconstruct the whole path using OperationId (the Azure name for the OTel trace ID) and find the break point.
Exam tips
- Start from Failures / Performance end-to-end transaction view, or from KQL on
AppDependencies - Correlate with
OperationIdacrossAppRequests,AppDependencies,AppExceptions,AppTraces - Parent succeeds + child fails → look at the failing dependency
- Duration spike without exception → latency bottleneck, not necessarily an error
- Broken traces at a boundary → missing
traceparentpropagation or uninstrumented service
Debugging workflow
- Portal waterfall — Application Insights → Performance or Failures → open a request → End-to-end transaction
- Or hunt by pattern in KQL — e.g. failing dependency target
- Pivot on
OperationId—unionall telemetry for that operation - Find the break — failing child, ballooning duration, or missing spans after a hop
- Fix instrumentation if traces stop cold at a queue or service with no children
Operation ID
OperationId(classic:operation_Id) is the shared correlation ID for one end-to-end request across Application Insights tables. It maps to the OpenTelemetry trace ID.
Kql
AppDependencies
| where Success == false and Target == "payments-api"
| project OperationId, TimeGenerated, Name, ResultCodeThen reconstruct the full flow:
Kql
union AppRequests, AppDependencies, AppExceptions, AppTraces
| where OperationId in ("id1", "id2", "id3")
| order by OperationId, TimeGenerated ascPractical KQL patterns
Exceptions joined to the triggering request
Kql
AppExceptions
| where TimeGenerated > ago(6h)
| join kind=inner (AppRequests | where TimeGenerated > ago(6h)) on OperationId
| project TimeGenerated, ProblemId, OuterMessage, Name, ResultCodeP95 latency by operation (spot regressions)
Kql
AppRequests
| where TimeGenerated > ago(1d)
| summarize p95 = percentile(DurationMs, 95) by Name
| order by p95 descFull trace for one operation
Kql
union AppRequests, AppDependencies, AppTraces, AppExceptions
| where OperationId == "abc123def456"
| project TimeGenerated, ItemType = type, Name, Message, DurationMs
| order by TimeGenerated asc
unionstacks rows from multiple tables. The specialtypecolumn tells you which table each row came from — useful for a unified timeline.
Common failure modes
| Symptom | Likely cause |
|---|---|
| Trace ends at Service A; nothing in Service B | Missing traceparent or B not instrumented |
| Request OK, dependency failed | Downstream error — inspect AppDependencies / AppExceptions |
| High duration, Success true | Slow path (DB, model, cold start) — not a hard failure |
Many unknown_service rows | Missing OTEL_SERVICE_NAME / service.name |
| Gaps in high-traffic apps | Aggressive sampling — increase rate temporarily while debugging |