Description
Bug Report
Version
tracing v0.1.26
│ │ │ │ ├── tracing-attributes v0.1.15 (proc-macro)
│ │ │ │ └── tracing-core v0.1.18
Platform
Linux odin 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Description
I cannot construct a field on the instrumented trace with a name that is not a Rust ident.
Documentation indicates that all features available in span! are available in #[instrument].
(I have not tested this feature in span!).
Code:
#[instrument(name = "API Gateway event handler", skip(e, _c), fields("comment" = "Event data is not recorded as it contains personal data."))]
Expected this to happen:
A field, comment, would be created containing the note and appear in my logs.
Instead this happened:
error: expected ident
--> src/handler.rs:43:70
|
43 | #[instrument(name = "API Gateway event handler", skip(e, _c), fields("comment" = "Event data is not recorded as it contains personal data...
The editor highlights "comment" as the offending term.