Questão de Linux Administration #019e3a4f
What is the telemetry component that represents a series of related distributed events that encode the end-to-end request flow through a distributed system?
Metrics
Logs
Spans
Traces
Explicação Oficial / Explicações da Comunidade
Summary: Distributed tracing is a method used to profile and monitor applications, especially those built using a microservices architecture. A trace is the telemetry component that represents the entire end-to-end flow of a request as it travels through a distributed system. It captures the path of the request across multiple services, providing visibility into performance bottlenecks and errors.
How it Works: When a request enters a distributed system, it is assigned a unique trace ID. As the request traverses each service, each unit of work (e.g., an API call, database query) is recorded as a span. Each span has a start and end time, and is associated with the trace ID. Spans can be nested to represent parent-child relationships. The collection of all spans for a given trace ID forms the complete trace, which can be visualized as a waterfall diagram showing the sequence and duration of operations.
Why Traces is Correct: A trace is specifically defined as the complete end-to-end flow of a request, composed of one or more spans. It encodes the entire journey of a request through a distributed system, making it the correct answer.
Why other options are incorrect:
- Metrics: Metrics are numeric aggregations (e.g., request count, latency percentiles) collected over time. They do not capture the flow of individual requests.
- Logs: Logs are discrete, timestamped messages recorded by applications. While useful for debugging, they are not structured to represent the end-to-end request flow.
- Spans: A span represents a single unit of work within a trace (e.g., a single service call). It is a component of a trace, not the entire end-to-end flow itself.