Minimal fixes for metrics

This commit is contained in:
2026-03-02 23:26:57 +01:00
parent 8c9cd96213
commit c03bd3e3a2
5 changed files with 22 additions and 10 deletions

View File

@@ -24,3 +24,11 @@ func TestRenderPrometheusHistogramNoEmptyLabelSet(t *testing.T) {
t.Fatalf("unexpected empty label set for gc count metric")
}
}
func TestEscapeLabelValueEscapesSingleBackslash(t *testing.T) {
got := escapeLabelValue(`a\b`)
want := `a\\b`
if got != want {
t.Fatalf("escapeLabelValue returned %q, want %q", got, want)
}
}