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

Method NewSummary

prometheus/promauto/auto.go:326–332  ·  view source on GitHub ↗

NewSummary works like the function of the same name in the prometheus package but it automatically registers the Summary with the Factory's Registerer.

(opts prometheus.SummaryOpts)

Source from the content-addressed store, hash-verified

324// NewSummary works like the function of the same name in the prometheus package
325// but it automatically registers the Summary with the Factory's Registerer.
326func (f Factory) NewSummary(opts prometheus.SummaryOpts) prometheus.Summary {
327 s := prometheus.NewSummary(opts)
328 if f.r != nil {
329 f.r.MustRegister(s)
330 }
331 return s
332}
333
334// NewSummaryVec works like the function of the same name in the prometheus
335// package but it automatically registers the SummaryVec with the Factory's

Callers 1

NewSummaryFunction · 0.80

Calls 2

NewSummaryFunction · 0.92
MustRegisterMethod · 0.65

Tested by

no test coverage detected