Skip to content

Commit 22d2d73

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Hide tokio:: from sentry stacktraces (#24032)
GitOrigin-RevId: 9c16a0448ea4ffb463fd4d8edfc8aaa9084db29e
1 parent 1c9a0e5 commit 22d2d73

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/errors/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
#![feature(type_alias_impl_trait)]
33
#![feature(let_chains)]
44
#![feature(impl_trait_in_assoc_type)]
5-
use std::borrow::Cow;
5+
use std::{
6+
borrow::Cow,
7+
sync::LazyLock,
8+
};
69

710
use ::metrics::{
811
metric_tag_const,
@@ -18,6 +21,10 @@ use tungstenite::protocol::{
1821

1922
mod metrics;
2023

24+
/// These module prefixes are default-hidden from stacktraces
25+
/// See https://docs.sentry.io/platforms/rust/configuration/options/#in-app-exclude
26+
pub static SENTRY_IN_APP_EXCLUDE: LazyLock<Vec<&'static str>> = LazyLock::new(|| vec!["tokio::"]);
27+
2128
/// ErrorMetadata object can be attached to an anyhow error chain via
2229
/// `.context(e /*ErrorMetadata*/)`. It is a generic object to be used
2330
/// across the codebase to tag errors with information that is used to classify.

0 commit comments

Comments
 (0)