Substrate tracing primitives and macros.
Note that to allow traces from wasm execution environment there are
2 reserved identifiers for tracing
Field recording, stored in the consts:
WASM_NAME_KEY - if you choose to record fields, you
must ensure that your identifiers do not clash with either of these.
Additionally, we have a const:
WASM_TRACE_IDENTIFIER, which holds a span name used
to signal that the 'actual' span name and target should be retrieved instead from
the associated Fields mentioned above.
Events represent single points in time during the execution of a program.
Spans represent periods of time in which a program was executing in a particular context.
Constructs an event at the debug level.
Constructs a span at the debug level.
Enter a span.
Constructs an event at the error level.
Constructs a span at the error level.
Constructs a new
Constructs an event at the info level.
Constructs a span at the info level.
Constructs a new span.
Constructs an event at the trace level.
Constructs a span at the trace level.
Constructs an event at the warn level.
Constructs a span at the warn level.
Runs given code within a tracing span, measuring it's execution time.
Describes the level of verbosity of a span or event.
A handle representing a span, with the capability to enter the span if it exists.
Span or Event Attributes
The name of a field provided as the argument name when contstructing an
A list of
Metadata provides generic information about the specifc location of the
A list of
The Tracing Level – the user can filter by this
A paramter value provided to the span/event
The fieldname for the wasm-originated name
The fieldname for the wasm-originated target
The identifier we are using to inject the wasm events in the generic
Try to init a simple tracing subscriber with log compatibility layer. Ignores any error. Useful for testing.