Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fragile to 2.0.0 #1533

Merged
merged 5 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion relay-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ chrono = { version = "0.4.11", features = ["serde"] }
clap = "2.33.1"
failure = "0.1.8"
flate2 = "1.0.19"
fragile = { version = "1.2.1", features = ["slab"] } # used for vendoring sentry-actix
fragile = { version = "2.0.0", features = ["slab"] } # used for vendoring sentry-actix
futures = { version = "0.3", package = "futures", features = ["compat"] }
futures01 = { version = "0.1.28", package = "futures" }
hashbrown = "0.12.3"
Expand Down
4 changes: 3 additions & 1 deletion relay-server/src/middlewares.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,14 @@ impl<S: 'static> Middleware<S> for SentryMiddleware {
let root_scope = hub.push_scope();
hub.configure_scope(move |scope| {
scope.add_event_processor(move |mut event| {
fragile::stack_token!(tok);

let mut cached_data = cached_data.lock().unwrap();
if cached_data.is_none() && req.is_valid() {
let with_pii = client
.as_ref()
.map_or(false, |x| x.options().send_default_pii);
*cached_data = Some(extract_request(req.get(), with_pii));
*cached_data = Some(extract_request(req.get(tok), with_pii));
}

if let Some((ref transaction, ref req)) = *cached_data {
Expand Down