A context for tracing the execution of processes, distributed or otherwise.
Consists of a span identifying an event, an optional parent span identifying a causal event
that triggered the current span, and a trace with which all related spans are associated.
An identifier of the trace associated with the current context. A trace ID is typically
created at a root span and passed along through all causal events.
An identifier of the current span. In typical RPC usage, a span is created by a client
before making an RPC, and the span ID is sent to the server. The server is free to create
its own spans, for which it sets the client’s span as the parent span.
Indicates whether a sampler has already decided whether or not to sample the trace
associated with the Context. If sampling_decision is None, then a decision has not yet
been made. Downstream samplers do not need to abide by “no sample” decisions–for example,
an upstream client may choose to never sample, which may not make sense for the client’s
dependencies. On the other hand, if an upstream process has chosen to sample this trace,
then the downstream samplers are expected to respect that decision and also sample the
trace. Otherwise, the full trace would not be able to be reconstructed.