You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
f32/f64 values in structured logs are treated as strings #1231
Unfortunately, the code snippet you provided does not compile for me; I get the following error:
error: argument never used
--> src/main.rs:26:26
|
26 | tracing::info!("hi", value);
| ---- ^^^^^ argument never used
| |
| formatting specifier missing
|
help: format specifiers use curly braces, consider adding a format specifier
|
26 | tracing::info!("hi{}", value);
| ++
Even with the compiler's suggested solution of adding the format specifier, I am not noticing any unexpected behavior. With that suggestion, the log looks like this in Sentry:
That output is formatted the same way that tracing formats it in the terminal:
2026-07-08T13:05:09.324159Z INFO tracing_log_floats: hi1
Could you please clarify more precisely how I can reproduce the issue you are seeing? And, could you also clarify what you mean when you say that the value is "displaying as a string, not a float," because what you mean is not entirely clear.
When filtering by structured logs in the sentry web app, it shows the type of structured value when typing in the field name.
My understanding is the type then impacts sorting behavior.
(the field has a different name here because I just grabbed the screenshot from our production application)
Activity
linear-code commentedon Jul 7, 2026
RUST-262
szokeasaurusrex commentedon Jul 8, 2026
Hi @rukai, thank you for reporting this issue.
Unfortunately, the code snippet you provided does not compile for me; I get the following error:
Even with the compiler's suggested solution of adding the format specifier, I am not noticing any unexpected behavior. With that suggestion, the log looks like this in Sentry:
That output is formatted the same way that tracing formats it in the terminal:
Could you please clarify more precisely how I can reproduce the issue you are seeing? And, could you also clarify what you mean when you say that the value is "displaying as a string, not a float," because what you mean is not entirely clear.
rukai commentedon Jul 8, 2026
Sorry, that was poor of me that it didn't even compile.
I am talking about structured logging:
When filtering by structured logs in the sentry web app, it shows the type of structured value when typing in the field name.

My understanding is the type then impacts sorting behavior.
(the field has a different name here because I just grabbed the screenshot from our production application)
szokeasaurusrex commentedon Jul 10, 2026
Thanks for the clarification, I was able to reproduce. Definitely seems like a bug or unexpected behavior at a minimum
fix(tracing): Preserve floating-point log attributes (#1278)
rukai commentedon Aug 3, 2026
Thanks!