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

Function MustNewMetricWithExemplars

prometheus/metric.go:270–276  ·  view source on GitHub ↗

MustNewMetricWithExemplars is a version of NewMetricWithExemplars that panics where NewMetricWithExemplars would have returned an error.

(m Metric, exemplars ...Exemplar)

Source from the content-addressed store, hash-verified

268// MustNewMetricWithExemplars is a version of NewMetricWithExemplars that panics where
269// NewMetricWithExemplars would have returned an error.
270func MustNewMetricWithExemplars(m Metric, exemplars ...Exemplar) Metric {
271 ret, err := NewMetricWithExemplars(m, exemplars...)
272 if err != nil {
273 panic(err)
274 }
275 return ret
276}

Calls 1

NewMetricWithExemplarsFunction · 0.85