MCPcopy
hub / github.com/prometheus/client_golang / sanitizeMetricFamily

Function sanitizeMetricFamily

prometheus/utils_test.go:43–48  ·  view source on GitHub ↗

sanitizeMetricFamily is like sanitizeMetric, but for multiple metrics.

(f *dto.MetricFamily)

Source from the content-addressed store, hash-verified

41
42// sanitizeMetricFamily is like sanitizeMetric, but for multiple metrics.
43func sanitizeMetricFamily(f *dto.MetricFamily) *dto.MetricFamily {
44 for _, m := range f.Metric {
45 sanitizeMetric(m)
46 }
47 return f
48}
49
50// toNormalizedJSON removes fake random space from proto JSON original marshaller.
51// It is required, so we can compare proto messages in json format.

Callers 4

ExampleCounterVecFunction · 0.85
ExampleSummaryVecFunction · 0.85
ExampleCollectorFuncFunction · 0.85
ExampleWrapCollectorWithFunction · 0.85

Calls 1

sanitizeMetricFunction · 0.85

Tested by

no test coverage detected