Event key-value data.
Spans and events may be annotated with key-value data, referred to as known
as fields. These fields consist of a mapping from a key (corresponding to
&str but represented internally as an array index) to a
Values as fields attached to spans or
The set of field keys on a given span or is defined on its
When a span is created, it provides
Attributes to the collector’s
new_span method, containing any fields whose values were provided when
the span was created; and may call the collector’s
Records if values are added for more of its fields.
Event type passed to the collector’s
will contain any fields attached to each event.
tracing represents values as either one of a set of Rust primitives
&str) or using a
fmt::Debug implementation. Collectors are provided
these primitive value types as
dyn Value trait objects.
These trait objects can be formatted using
fmt::Debug, but may also be
recorded as typed data by calling the
Value::record method on these
trait objects with a visitor implementing the
Visit trait. This trait
represents the behavior used to record values of various types. For example,
we might record integers by incrementing counters for their field names,
rather than printing them.
Valuewhich serializes as a string using
Valuewhich serializes using
Span’s key-value data.