Skip to content

Commit 7dcf03d

Browse files
committed
Fix metrics rendering due to newline in desccription
1 parent 1c0ec45 commit 7dcf03d

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Cargo.lock

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,3 @@ sha2 = "0.11.0-rc.0"
3838
thiserror = "2.0.12"
3939
tokio = { version = "1.46.1", features = ["macros", "rt-multi-thread"] }
4040
url = { version = "2.5.4", features = ["serde"] }
41-
42-
[patch.crates-io]
43-
# prometheus/client_rust#279 (causes problems with VictoriaMetrics)
44-
prometheus-client = { git = 'https://github.com/whamcloud/client_rust.git', branch = "spoutn1k/svelte-encoding" }

src/api/common/metrics.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ macro_rules! make_api_metric {
3636
$registry.register(
3737
name_str,
3838
$metrics_struct::get_field_docs(name_str)
39-
.expect(&format!("No doc comment for '{}' field", name_str)),
39+
.expect(&format!("No doc comment for '{}' field", name_str))
40+
.replace('\n', ""),
4041
$name.clone()
4142
);
4243
};

0 commit comments

Comments
 (0)