Chapter 1 – Observability Needs of Modern Applications
- You can think about a span as a structured event with a strict but extensible schema, allowing you to track any interesting operation. Spans have trace context that describes the relationships between them. They also have a name, start time, end time, status, and a property bag, with attributes to represent operation details.
Complex and distributed operations need multiple spans that describe at least each incoming and outgoing request. A group of such correlated spans that share the same trace-id
is called a trace.
- Spans (also known as Activities in .NET) are created by many libraries and applications. To enable correlation, we need to propagate context within the process and between processes.
In .NET, we use Activity.Current
to propagate context within the process. This is a current span that flows with an execution context in synchronous or asynchronous calls. Whenever a new activity is started...