Checking in progress, though not fully working as expected
This commit is contained in:
@@ -103,25 +103,12 @@ macro_rules! report_if_error {
|
||||
}
|
||||
pub use report_if_error;
|
||||
|
||||
/// Returns whether or not a log entry with the given metadata should be
|
||||
/// ignored by Sentry.
|
||||
#[cfg(feature = "crash_reporting")]
|
||||
pub fn should_ignore_log_for_sentry(md: &log::Metadata) -> bool {
|
||||
// Filter out any Error-level log entries generated by report_error!().
|
||||
// report_error!() utilizes capture_anyhow() to report structured errors
|
||||
// instead of simple string error messages, and we don't want to _also_
|
||||
// report the Error-level log line to Sentry.
|
||||
md.target() == LOG_TARGET && md.level() == log::Level::Error
|
||||
}
|
||||
|
||||
pub trait ErrorExt: RegisteredError + std::error::Error {
|
||||
/// Returns whether or not an error is something that is actionable by our
|
||||
/// engineering team.
|
||||
fn is_actionable(&self) -> bool;
|
||||
|
||||
fn report_error(&self) {
|
||||
#[cfg(feature = "crash_reporting")]
|
||||
sentry::capture_error(self);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user