Skip to content

Improve the logs integration with tracing #857

Open
@thomaseizinger

Description

@thomaseizinger

Description

We make use of structured logging a lot using tracing, i.e. a lot of context of our log messages is captured in fields set either on the message or via a span. By default, the rendering of the message in the logs overview is therefore pretty useless because one needs to unfold each message to see the variables.

For our stderr logs, we use tracing_subscriber::fmt so our heads are used to parsing through logs in that format. To mimic this, we added a before_log hook that renders certain fields as key=value into the message. The code for that is here: https://github.com/firezone/firezone/blob/ac34635db891f1a57ea36e8754894f1cf4984143/rust/telemetry/src/lib.rs#L296-L321

I am not sure what the best path forward here is for improving this feature from the Sentry side. I just wanted to share this as feedback how we are using it :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions