Microservices - Monitoring and ObservabilityWhich of the following is the correct way to pass a Correlation ID between microservices?AAdd it as a custom HTTP header in the requestBInclude it as a query parameter in the URLCStore it in a database before each callDEmbed it inside the response bodyCheck Answer
Step-by-Step SolutionSolution:Step 1: Review common practices for passing metadataMetadata like Correlation IDs are typically passed in HTTP headers to keep requests clean and consistent.Step 2: Evaluate optionsQuery parameters can be altered or logged insecurely; storing in DB is inefficient; response body is too late for tracking.Final Answer:Add it as a custom HTTP header in the request -> Option AQuick Check:Correlation ID in headers = best practice [OK]Quick Trick: Use HTTP headers to pass Correlation IDs [OK]Common Mistakes:MISTAKESUsing query parameters which can be insecureStoring IDs in database for each callEmbedding IDs in response body instead of request
Master "Monitoring and Observability" in Microservices9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More Microservices Quizzes Event-Driven Architecture - Event store concept - Quiz 5medium Monitoring and Observability - Why observability is critical in distributed systems - Quiz 11easy Monitoring and Observability - Dashboards (Grafana) - Quiz 15hard Orchestration with Kubernetes - Liveness and readiness probes - Quiz 9hard Orchestration with Kubernetes - Pods and deployments for services - Quiz 4medium Resilience Patterns - Retry with exponential backoff - Quiz 8hard Resilience Patterns - Bulkhead pattern - Quiz 9hard Service Mesh - Sidecar proxy pattern - Quiz 15hard Service Mesh - Linkerd overview - Quiz 2easy Service Mesh - Sidecar proxy pattern - Quiz 3easy