NewHistogram works like the function of the same name in the prometheus package but it automatically registers the Histogram with the Factory's Registerer.
(opts prometheus.HistogramOpts)
| 346 | // package but it automatically registers the Histogram with the Factory's |
| 347 | // Registerer. |
| 348 | func (f Factory) NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram { |
| 349 | h := prometheus.NewHistogram(opts) |
| 350 | if f.r != nil { |
| 351 | f.r.MustRegister(h) |
| 352 | } |
| 353 | return h |
| 354 | } |
| 355 | |
| 356 | // NewHistogramVec works like the function of the same name in the prometheus |
| 357 | // package but it automatically registers the HistogramVec with the Factory's |
no test coverage detected