Skip to content

Commit

Permalink
Hide tokio:: from sentry stacktraces (#24032)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 9c16a0448ea4ffb463fd4d8edfc8aaa9084db29e
  • Loading branch information
nipunn1313 authored and Convex, Inc. committed Mar 27, 2024
1 parent 1c9a0e5 commit 22d2d73
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#![feature(type_alias_impl_trait)]
#![feature(let_chains)]
#![feature(impl_trait_in_assoc_type)]
use std::borrow::Cow;
use std::{
borrow::Cow,
sync::LazyLock,
};

use ::metrics::{
metric_tag_const,
Expand All @@ -18,6 +21,10 @@ use tungstenite::protocol::{

mod metrics;

/// These module prefixes are default-hidden from stacktraces
/// See https://docs.sentry.io/platforms/rust/configuration/options/#in-app-exclude
pub static SENTRY_IN_APP_EXCLUDE: LazyLock<Vec<&'static str>> = LazyLock::new(|| vec!["tokio::"]);

/// ErrorMetadata object can be attached to an anyhow error chain via
/// `.context(e /*ErrorMetadata*/)`. It is a generic object to be used
/// across the codebase to tag errors with information that is used to classify.
Expand Down

0 comments on commit 22d2d73

Please sign in to comment.