
Show answerHide answer
Explanation
ExplanationTo implement distributed trace correlation, you must first instrument the application code using the OpenTelemetry SDK. This step is essential because the SDK is responsible for generating trace context (Trace IDs and Span IDs) as requests move through your services.
Once the code is instrumented to create this telemetry, you must configure a trace exporter in the OpenTelemetry SDK. The exporter acts as the bridge, taking the generated trace data and sending it to your observability backend (such as Azure Monitor Application Insights).
Finally, you must redeploy the instrumented services. Code changes and configuration updates only take effect in the live environment after the updated application is built and deployed, allowing the services to begin emitting correlated trace data.
Why Other Options Are Incorrect
- Implement a view in the OpenTelemetry SDK: Incorrect. In OpenTelemetry, "views" are used exclusively for filtering and aggregating metrics, not for managing or correlating distributed traces.
- Call TelemetryClient.TrackEvent() within service methods: Incorrect. This uses the legacy Application Insights SDK rather than the OpenTelemetry SDK. Furthermore, TrackEvent logs custom events; it does not establish the distributed trace context required for correlation.
References
- Microsoft Learn: Instrument an application with OpenTelemetry (Covers SDK setup and exporters).




