Skip to content

Commit

Permalink
Remove max_scuba_msg_length tunable
Browse files Browse the repository at this point in the history
Summary: We never changed this tunable since introducing it. I think it is reasonable to thik we will change it in the future because f how much space the message column takes up, but we can tweak it via an update of this constant. I don't think this needs to be in a config either

Reviewed By: mzr

Differential Revision: D50261199

fbshipit-source-id: dc7e0594a3499b0a3f090b2a5b3f6addece0c606
  • Loading branch information
Clara Rull authored and facebook-github-bot committed Oct 13, 2023
1 parent 4a848fa commit 0c6c263
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion eden/mononoke/common/scuba_ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ permission_checker = { version = "0.1.0", path = "../../permission_checker" }
scribe_ext = { version = "0.1.0", path = "../scribe_ext" }
scuba = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
time_ext = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
tunables = { version = "0.1.0", path = "../../tunables" }
1 change: 0 additions & 1 deletion eden/mononoke/common/scuba_ext/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ rust_library(
"//eden/mononoke/observability:observability",
"//eden/mononoke/permission_checker:permission_checker",
"//eden/mononoke/server/metadata:metadata",
"//eden/mononoke/tunables:tunables",
"//eden/scm/lib/clientinfo:clientinfo",
],
)
17 changes: 5 additions & 12 deletions eden/mononoke/common/scuba_ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ use scuba::ScubaSample;
use scuba::ScubaSampleBuilder;
pub use scuba::ScubaValue;
use time_ext::DurationExt;
use tunables::tunables;

const FILE_PREFIX: &str = "file://";
const MAX_SCUBA_MSG_LEN: usize = 512000;

/// An extensible wrapper struct around `ScubaSampleBuilder`
#[derive(Clone)]
Expand Down Expand Up @@ -209,17 +209,10 @@ impl MononokeScubaSampleBuilder {

self.inner.add("log_tag", log_tag);
if let Some(mut msg) = msg.into() {
match tunables()
.max_scuba_msg_length()
.unwrap_or_default()
.try_into()
{
Ok(size) if size > 0 && msg.len() > size => {
msg.truncate(size);
msg.push_str(" (...)");
}
_ => {}
};
if MAX_SCUBA_MSG_LEN > 0 && msg.len() > MAX_SCUBA_MSG_LEN {
msg.truncate(MAX_SCUBA_MSG_LEN);
msg.push_str(" (...)");
}

self.inner.add("msg", msg);
}
Expand Down
1 change: 0 additions & 1 deletion eden/mononoke/tunables/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ pub struct MononokeTunables {
/// Maximum age of bookmarks subscriptions.
bookmark_subscription_max_age_ms: TunableI64,
bookmark_subscription_protect_master: TunableBool,
max_scuba_msg_length: TunableI64,
edenapi_large_tree_metadata_limit: TunableI64,
edenapi_req_dumper_sample_ratio: TunableI64,
command_monitor_interval: TunableI64,
Expand Down

0 comments on commit 0c6c263

Please sign in to comment.