Sobes.tech
Junior — Middle

What is considered the main unit in a tracing system?

sobes.tech AI

Answer from AI

In a tracing system, the primary unit is called a span.

A span is a time interval that represents the execution of a specific operation or part of a task in a distributed system. Each span contains information about the start and end of the operation, its identifier, relationships with other spans (e.g., parent span), and metadata (tags, logs).

Using spans, one can construct a tree or call graph, which allows tracking the request path through various services and components, identifying bottlenecks, and analyzing performance.

Example: when processing an HTTP request, a span is created, within which child spans can be created for database calls, external API calls, etc.