Compare commits

..

2 Commits

Author SHA1 Message Date
mammuthus 799f0839ac
Merge 9b64d2ee17 into 8ac1a0017d 2026-04-03 11:49:41 +04:00
mammuthus 9b64d2ee17
style(metrics): apply rustfmt for build_info additions 2026-04-03 07:49:37 +00:00
1 changed files with 12 additions and 5 deletions

View File

@ -234,7 +234,10 @@ async fn render_metrics(stats: &Stats, config: &ProxyConfig, ip_tracker: &UserIp
let me_allows_normal = telemetry.me_level.allows_normal();
let me_allows_debug = telemetry.me_level.allows_debug();
let _ = writeln!(out, "# HELP telemt_build_info Build information for the running telemt binary");
let _ = writeln!(
out,
"# HELP telemt_build_info Build information for the running telemt binary"
);
let _ = writeln!(out, "# TYPE telemt_build_info gauge");
let _ = writeln!(
out,
@ -2937,10 +2940,14 @@ mod tests {
.unwrap()
.contains("telemt_connections_total 3")
);
assert!(std::str::from_utf8(body.as_ref()).unwrap().contains(&format!(
"telemt_build_info{{version=\"{}\"}} 1",
env!("CARGO_PKG_VERSION")
)));
assert!(
std::str::from_utf8(body.as_ref())
.unwrap()
.contains(&format!(
"telemt_build_info{{version=\"{}\"}} 1",
env!("CARGO_PKG_VERSION")
))
);
config.general.beobachten = true;
config.general.beobachten_minutes = 10;