Answer: Structured logging records events in a consistent machine-readable format, such as JSON, instead of plain free-form text.
Answer: Correlation IDs let you tie related events together across multiple services and follow one request from start to finish.
Answer: The main service handled the order workflow, generated or accepted a correlation ID, and forwarded it to the downstream service.
Answer: It simulated an upstream dependency by handling an inventory check and logging events with the same correlation ID.
Answer: It was read from the incoming request or generated locally, stored in request context, and sent onward through the X-Correlation-ID header.
Answer: JSON logs are easier to search, parse, group, and analyze in automation or centralized logging systems.
Answer: It grouped combined logs by correlation ID and reconstructed request flow across both services.
Answer: I checked that both service logs showed the same correlation ID for the same end-to-end request flow.
Answer: It addresses the difficulty of troubleshooting distributed applications when related log events are spread across services.
Answer: The final result was a traceable two-service logging workflow with structured logs and analyzable request correlation.