tokio-rs / tracing

Application level tracing for Rust.
https://tracing.rs
MIT License
5.19k stars 677 forks source link

Docs: tracing field names CAN actually have a dot in them now #2895

Open adamchalmers opened 5 months ago

adamchalmers commented 5 months ago

Docs for #[instrument] claim that "The name of the field must be a single valid Rust identifier, nested (dotted) field names are not supported."

But then later they use an example field name which does have a dot:

#[instrument(fields(http.uri = req.uri(), http.method = req.method()))]

So the docs are outdated, and fields are no longer restricted to being a single Rust identifier.