Kubernetes and Cloud Native Associate (KCNA)Cloud Native ObservabilityMedium
A cloud-native application uses an event-driven architecture, where messages are passed between services via a message queue. When an issue occurs, it's critical to determine if a message was successfully processed by all downstream services or if it got lost/stuck at an intermediary step. Which type of observability data is best suited to track the full lifecycle of a single message through this asynchronous flow?
- ANetwork Flows
- BApplication Logs
- CDistributed Traces
- DSystem Metrics
Show answer & explanationAnswer & explanation
Correct answer: C. Distributed Traces
Distributed tracing is designed to follow the complete path of a request or message through a distributed system, including asynchronous operations. By propagating trace context (e.g., trace IDs) with the message, it allows visualizing the entire lifecycle, identifying processing times, and pinpointing where a message might have been lost or stalled.
Why the other options are wrong
- A. Network flows provide traffic metadata but not the application-level processing of a message.
- B. Application logs record events, but correlating them across multiple asynchronous services for a single message is challenging without tracing.
- D. System metrics provide aggregated performance data but don't track individual message lifecycles.
Distributed Tracing (Asynchronous)
The application of distributed tracing to track the lifecycle of a message or event through asynchronous components like message queues and event buses.
- Requires propagating trace context (trace ID, span ID) with messages.
- Helps visualize the entire asynchronous flow.
- Identifies bottlenecks and failures in event-driven architectures.
Memory trick: Traces follow the Thread of your message, even when it's not direct.