Skip to content

f32/f64 values in structured logs are treated as strings #1231

Description

@rukai

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

0.48.4

Steps to reproduce

let value: f32 = 1.0;
tracing::info!("hi", value)

Expected result

Value should show up as a float in the sentry web UI

Actual result

value does not show up as a float in the sentry web ui

Investigation

I can see here that tracing supports floats in its structured values:
https://docs.rs/tracing/latest/tracing/field/trait.Visit.html#method.record_f64

But sentry's implementation of Visit does not implement record_f64

impl Visit for FieldVisitor {

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingLogsRustSDK

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions