Bird
0
0

In a microservice system, a bug causes Correlation IDs to be overwritten with empty strings in some services. What is the best fix?

medium📝 Analysis Q7 of 15
Microservices - Monitoring and Observability
In a microservice system, a bug causes Correlation IDs to be overwritten with empty strings in some services. What is the best fix?
AGenerate a new Correlation ID in every service regardless
BRemove Correlation IDs entirely from all services
CCheck and preserve existing Correlation ID before overwriting
DStore Correlation IDs only in the database
Step-by-Step Solution
Solution:
  1. Step 1: Identify the problem with overwriting IDs

    Overwriting with empty strings breaks traceability and should be avoided.
  2. Step 2: Implement fix to preserve existing IDs

    Services should check if a Correlation ID exists and keep it instead of overwriting.
  3. Final Answer:

    Check and preserve existing Correlation ID before overwriting -> Option C
  4. Quick Check:

    Preserve existing ID to maintain trace [OK]
Quick Trick: Never overwrite valid Correlation IDs with empty values [OK]
Common Mistakes:
MISTAKES
  • Removing Correlation IDs completely
  • Generating new IDs every time breaks trace
  • Storing IDs only in database misses real-time tracing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes