-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fmt: Missing space between multiple values for the same key on a span #627
Comments
Thanks for reporting & providing a minimal reproduction! This definitely looks like a bug. |
I think fixing this should be relatively straight-forward. Here is the code where we are recording a new value into a span that already has formatted fields: tracing/tracing-subscriber/src/fmt/fmt_layer.rs Lines 462 to 465 in d0a3bdd
We can check here if the formatted fields string is non-empty. If it is, we can append a If anyone is interested in looking into this, it's probably a pretty good first issue. I'm happy to provide further advice, too! |
… a span tokio-rs#627 Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Version
tracing v0.1.13
│ ├── tracing-attributes v0.1.7
│ └── tracing-core v0.1.10
└── tracing-subscriber v0.2.3
├── tracing-core v0.1.10 ()
├── tracing-log v0.1.1
│ └── tracing-core v0.1.10 ()
└── tracing-serde v0.1.1
└── tracing-core v0.1.10 (*)
Platform
Linux elysium 5.5.6-arch1-1 #1 SMP PREEMPT Mon, 24 Feb 2020 12:20:16 +0000 x86_64 GNU/Linux
Crates
tracing
tracing-subscriber
Description
When repeatedly
record()
ing values to the same span key, a space between each KV pair is missing.MVP:
The expected result:
<DATE> INFO debug{happy=true happy=false}: <FILE>: hello world
The actual output:
<DATE> INFO debug{happy=truehappy=false}: <FILE>: hello world
Note the lack of a space between 'true' and 'happy'
The text was updated successfully, but these errors were encountered: