QuestionQ65

VerifiedSecure, monitor, troubleshoot Azure solutions

A Python web API uses OpenTelemetry for tracing. The call_downstream_service function sends an outbound HTTP request using the requests library. The following code is the application's only OpenTelemetry configuration:

Question Image

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

Yes or No
StatementsYesNo
The code creates a span for each request.
The code automatically propagates trace context to downstream HTTP services.
The solution requires additional instrumentation for end-to-end trace correlation.
Explanation

tracer.start_as_current_span("process_request") creates and activates an in-process span for every execution of process_request(). The OpenTelemetry API alone does not instrument the requests library or inject propagation headers into an outbound HTTP request. Instrumenting requests (or manually injecting the configured propagator's context) is required for downstream services to correlate the request with the same distributed trace.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!