AZ-400 Question 301
Select 2You have a microservice-based solution hosted in Azure. Each microservice is instrumented with the Application Insights SDK for .NET, and you're attempting to trace requests that flow through multiple services as part of a single end-to-end transaction. However, you're only seeing separate traces for each service with no correlation in the Application Insights portal. Which two actions should you perform to enable effective distributed tracing in Application Insights?
- A
Configure all microservices to use the same Application Insights connection string (or instrumentation key).
- B
Enable Operation Name Overriding in the Azure portal for all microservices to override incoming request names.
- C
Propagate trace context headers (such as traceparent or Request-Id) from incoming HTTP calls to outgoing calls in the code.
- D
Deploy the same version of the Application Insights SDK (the same NuGet package version) to standardize logging across all microservices.
Show answer and explanation
Correct answers: A, C
Explanation
Distributed tracing in Application Insights requires two primary configurations: first, all services must use the same connection string (or instrumentation key) to send their telemetry data to a common resource. Second, the correlation headers generated by the first service must be passed along to subsequent services to establish an end-to-end transaction context. By ensuring these steps, you can view the entire call chain in the Application Insights portal and diagnose performance issues across microservices. For more information, refer to the official Microsoft documentation on 'End-to-end transaction monitoring in Application Insights.'
- A. Correct.
Correct. For Application Insights to correlate telemetry across multiple services, they must share the same connection string or instrumentation key (unless you use specialized cross-AI-resource correlation). This ensures all data reports to the same logical endpoint for correlation.
- B. Incorrect.
Incorrect. Simply enabling Operation Name Overriding in the portal won't by itself correlate traces. Overriding operation names can help with naming consistency, but it doesn�t establish distributed tracing across services.
- C. Correct.
Correct. You must pass correlation headers (traceparent in W3C protocol or Request-Id/Correlation-Context for legacy) between services. This ensures each service's telemetry is linked to the same overall operation, enabling end-to-end tracing in the Application Insights portal.
- D. Incorrect.
Incorrect. While using the same SDK version can help ensure consistent behavior, it doesn't automatically establish distributed trace correlation. You still need to propagate trace context and use the same Application Insights resource.