-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
The Trillium handler for errors was unconditionally logging them at `WARN`, generating large volumes of logging for problems that aren't Janus' fault, like reports whose timestamps are in the future. Now, we check whether the respones indicates a server error before bothing to log it (keeping in mind that client errors will still appear in metrics). Additionally, we've made liberal use of the [`tracing::instrument`][1] attribute macro to decorate various functions and methods with tracing spans, and in particular its `err` argument for logging anytime a function that returns `Result<T, E>` returns an `Err`. Mostly, logging those errors is handled at a higher level -- say, in a Trillium handler or in the top-level loop of `aggregation_job_driver` -- so logging them at level `ERROR` at the function call itself isn't that helpful. This commit further qualifies the `err` argument so that those errors are now logged at `DEBUG`, so we can opt back into them should they prove useful. [1]: https://docs.rs/tracing/latest/tracing/attr.instrument.html
- Loading branch information
1 parent
3778fdc
commit e1fa5a4
Showing
3 changed files
with
78 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.