AZ-204 Practice Question: Distributed tracing correlation across App…
Three microservices collaborate on a single user transaction: an App Service API, an Azure Function that processes a Service Bus message, and a downstream storage service. Traces appear separately in Application Insights with no parent-child relationship. What is needed to correlate all three into a single end-to-end trace?
⚠ Common exam trap
A common mix-up: candidates assume sharing an instrumentation key is sufficient for correlation, overlooking the necessity of W3C Trace-Context header propagation across both synchronous HTTP and asynchronous messaging protocols.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Install the Application Insights SDK on all three services and ensure W3C Trace Context header propagation is enabled for both HTTP calls and Service Bus messages
Distributed tracing across HTTP and asynchronous messaging requires the Application Insights SDK on each service and propagation of the W3C Trace-Context standard (traceparent and tracestate headers). This ensures that the App Service API, Azure Function, and downstream storage service share a single trace ID, enabling Application Insights to correlate all telemetry into one end-to-end transaction view.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Install the Application Insights SDK on all three services and ensure W3C Trace Context header propagation is enabled for both HTTP calls and Service Bus messages
Why this is correct
The SDK propagates the traceparent header on outgoing HTTP requests automatically. For Service Bus, the SDK injects and reads correlation properties in the message's ApplicationProperties collection. With the same operation ID flowing through all three services, Application Insights assembles the calls into a single end-to-end trace in the Application Map and end-to-end transaction view.
- ✗
Use the same Application Insights instrumentation key for all three services — no additional configuration is needed
Why it's wrong here
Sharing an instrumentation key sends all telemetry to the same resource but does not automatically correlate traces. Without header propagation, each service generates its own independent operation IDs, so the calls appear unrelated even in the same Application Insights resource.
- ✗
Add a custom x-correlation-id header in each service and log it with TelemetryClient.TrackEvent
Why it's wrong here
A custom header logged as a custom event produces correlated log entries but does not integrate with Application Insights' built-in distributed tracing model. The Application Map, end-to-end transaction view, and dependency diagrams require the SDK's native W3C correlation, not custom event logging.
- ✗
Enable Azure Monitor cross-resource queries and write a KQL join across all three services' logs
Why it's wrong here
KQL cross-resource joins can correlate log data after the fact but do not create live distributed trace relationships. This approach requires manual query authoring for every investigation and does not produce the automatic visual correlation that W3C Trace Context provides.
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Distributed tracing
Distributed tracing is a method used to track and observe requests as they flow through multiple services in a distributed system, helping identify performance bottlenecks and failures.
Key term
Application Insights
Application Insights is an Azure monitoring service that helps developers detect, diagnose, and understand issues in live web applications by collecting telemetry data like requests, exceptions, and performance counters.
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.