Commit graph

4 commits

Author SHA1 Message Date
Olivia Lee
a3448b5c84
switch all error logs to using *_err macros 2025-03-22 14:34:04 -07:00
Olivia Lee
d28135f7ca
add helper macros to log error source chains
The specific thing that prompted this is that Error::Reqwest only logs
the Display impl of reqwest::Error, while the actual information you
need to determine what went wrong is usually buried deeper in the source
chain. This makes debugging federation networking issues super
frustrating.

Instead of just fixing this one case, let's just log the source chains
everywhere. What could go wrong?
2025-03-22 14:34:04 -07:00
Olivia Lee
5fca67054e
switch all tracing imports to observability::prelude 2025-03-22 14:34:02 -07:00
Olivia Lee
bc5f31b3a2
add observability prelude module
The reason to do a wildcard import of the prelude instead of something
like

    // src/observability/prelude.rs
    pub(crate) use tracing::*;

    // elsewhere
    use crate::observability::prelude as o;
    o::warn!("something");

is that we can't import traits like tracing::Instrument that way.

I'm generally not a fan of wildcard imports, but I think it can be okay
when it's a module in the same crate. There aren't really an backwards
compatibility hazards because it's your own code.
2025-03-22 14:19:18 -07:00