fix(obs): tighten low-risk telemetry correctness (#4483)

Refs rustfs/backlog#1007
Refs rustfs/backlog#986

- respect explicit log-target directives when injecting noisy-crate suppressions
- fix daily rotation day-boundary checks and add a short retry cooldown after failed rotations
- preserve recorder metadata across label variants and serialize gauge updates before export
- correct profiling target_env reporting, trace all=true parsing, cleaner accounting/docs, and legacy system interval rounding

Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-07-08 22:06:19 +08:00
committed by GitHub
parent dee8e4e639
commit 87044b2378
12 changed files with 217 additions and 31 deletions
+17 -1
View File
@@ -125,7 +125,17 @@ fn legacy_profiling_env_keys_present() -> Vec<&'static str> {
}
fn target_env() -> &'static str {
option_env!("CARGO_CFG_TARGET_ENV").unwrap_or("unknown")
if cfg!(target_env = "gnu") {
"gnu"
} else if cfg!(target_env = "musl") {
"musl"
} else if cfg!(target_env = "msvc") {
"msvc"
} else if cfg!(target_env = "sgx") {
"sgx"
} else {
"unknown"
}
}
#[cfg(test)]
@@ -146,4 +156,10 @@ mod tests {
},
);
}
#[test]
fn target_env_reports_known_compile_target_or_unknown() {
let value = target_env();
assert!(matches!(value, "gnu" | "musl" | "msvc" | "sgx" | "unknown"));
}
}