Bird
0
0

Which of the following is the correct way to propagate trace context between microservices using HTTP headers?

easy📝 Conceptual Q12 of 15
Microservices - Monitoring and Observability
Which of the following is the correct way to propagate trace context between microservices using HTTP headers?
AAdd <code>Cookie</code> header with span ID
BAdd <code>Authorization</code> header with trace ID
CAdd <code>X-B3-TraceId</code> and <code>X-B3-SpanId</code> headers to the outgoing request
DAdd <code>Content-Type</code> header with trace ID value
Step-by-Step Solution
Solution:
  1. Step 1: Recall standard trace context headers

    Distributed tracing uses specific headers like X-B3-TraceId and X-B3-SpanId to pass trace info between services.
  2. Step 2: Identify correct header usage

    Headers like Authorization, Content-Type, or Cookie are unrelated to tracing context propagation.
  3. Final Answer:

    Add X-B3-TraceId and X-B3-SpanId headers to the outgoing request -> Option C
  4. Quick Check:

    Trace context headers = X-B3-TraceId, X-B3-SpanId [OK]
Quick Trick: Trace context uses X-B3 headers, not auth or content-type [OK]
Common Mistakes:
MISTAKES
  • Using unrelated HTTP headers for trace context
  • Forgetting to propagate span ID
  • Confusing trace ID with authentication tokens

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes