Skip to content

Commit d4e67d5

Browse files
committed
rust helper: don't collect backtraces in rc error path
Causes flakiness in the tests, as symbolization can take > 10 s.
1 parent 260544c commit d4e67d5

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

appsec/helper-rust/src/service.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use anyhow::Context;
22
use arc_swap::ArcSwap;
33
use std::{
4-
backtrace::{Backtrace, BacktraceStatus},
54
collections::{HashMap, HashSet},
65
hash::Hash,
76
path::PathBuf,
@@ -586,16 +585,11 @@ impl Service {
586585
.add("appsec_config_key", rc_path)
587586
.add("rc_config_id", &parsed_key.config_id);
588587

589-
let backtrace = match error.backtrace().status() {
590-
BacktraceStatus::Captured => error.backtrace().to_string(),
591-
_ => Backtrace::force_capture().to_string(),
592-
};
593-
594588
logs_submitter.submit_log(TelemetryLog {
595589
level: telemetry::LogLevel::Error,
596590
identifier,
597591
message,
598-
stack_trace: Some(backtrace),
592+
stack_trace: None,
599593
tags: Some(tags),
600594
is_sensitive: false,
601595
});
@@ -617,7 +611,7 @@ impl Service {
617611
level: telemetry::LogLevel::Error,
618612
identifier: "rc::client::exception".to_string(),
619613
message,
620-
stack_trace: Some(error.backtrace().to_string()),
614+
stack_trace: None,
621615
tags: None,
622616
is_sensitive: false,
623617
});

0 commit comments

Comments
 (0)