Allow extra fields for span created by the #[instrument] macro #573
Labels
crate/attributes
Related to the `tracing-attributes` crate
good first issue
Good for newcomers
kind/feature
New feature or request
Feature Request
Crates
Motivation
This is to be able to record a value later on like
Span::current().record("field", value)
within the function.Proposal
I'm not entirely sure since I haven't worked with attribute macros much before.
#[instrument(fields(key = "value"))]
or even
#[instrument(fields(foo, hello = "world"))]
allowing empty fields if #548 is merged.
Alternatives
Open to alternatives, but I couldn't think of one!
The text was updated successfully, but these errors were encountered: