Bird
0
0

Which of the following is the correct way to pass a Correlation ID between microservices?

easy📝 Conceptual Q12 of 15
Microservices - Monitoring and Observability
Which of the following is the correct way to pass a Correlation ID between microservices?
AAdd it as a custom HTTP header in the request
BInclude it as a query parameter in the URL
CStore it in a database before each call
DEmbed it inside the response body
Step-by-Step Solution
Solution:
  1. Step 1: Review common practices for passing metadata

    Metadata like Correlation IDs are typically passed in HTTP headers to keep requests clean and consistent.
  2. Step 2: Evaluate options

    Query parameters can be altered or logged insecurely; storing in DB is inefficient; response body is too late for tracking.
  3. Final Answer:

    Add it as a custom HTTP header in the request -> Option A
  4. Quick Check:

    Correlation ID in headers = best practice [OK]
Quick Trick: Use HTTP headers to pass Correlation IDs [OK]
Common Mistakes:
MISTAKES
  • Using query parameters which can be insecure
  • Storing IDs in database for each call
  • Embedding IDs in response body instead of request

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes