AZ-400 Question 303
Select 2You manage a microservices-based application with components running in Azure App Service and Azure Kubernetes Service (AKS). Each microservice is instrumented with the Application Insights SDK, but the operations team reports difficulty tracing individual user requests across multiple services. You need to inspect distributed tracing data in Application Insights to identify performance bottlenecks and track end-to-end transaction flows. Which two actions should you perform to achieve this? (Choose two.)
- A
Enable the Application Insights Profiler for each microservice to record CPU usage.
- B
Configure each microservice to use the same Application Insights connection string.
- C
Pass a custom header named operation_Id in all calls across microservices.
- D
Use the Application Map in Application Insights to visualize service dependencies.
Show answer and explanation
Correct answers: B, D
Explanation
In a distributed microservices architecture, enabling end-to-end tracing in Application Insights depends on consistent telemetry configuration and leveraging built-in tools. First, ensure that each microservice uses the same connection string or instrumentation key so that Application Insights can correlate data under a single resource. Second, use the Application Map feature in the Azure portal to visualize interactions between services, see response times, and troubleshoot failures. Refer to Microsoft Docs (https://docs.microsoft.com/azure/azure-monitor/app/distributed-tracing) for more details on implementing distributed tracing across multiple services with Application Insights.
- A. Incorrect.
Incorrect: While the Application Insights Profiler can provide valuable performance metrics (e.g., CPU usage and memory allocation), enabling it does not inherently provide distributed tracing across multiple microservices. Profiler is more about detailed performance profiling rather than connecting request flows end-to-end.
- B. Correct.
Correct: To correlate telemetry across different microservices, each service should report to the same Application Insights resource or workspace, which means using the same connection string (or instrumentation key if using older configurations). This ensures a consistent reference enabling end-to-end transaction tracing.
- C. Incorrect.
Incorrect: Manually passing operation_Id headers is not required if you use the official Application Insights SDK and properly configure the same Application Insights resource for your microservices. The SDK automatically handles request correlation using standard headers (e.g., Request-Id, Traceparent).
- D. Correct.
Correct: The Application Map feature helps visualize how microservices call each other. It provides a graphical view of dependencies, latencies, and potential failure points across the entire request chain, making it easier to inspect distributed tracing data.