NewHistogramVec works like the function of the same name in the prometheus package but it automatically registers the HistogramVec with the Factory's Registerer.
(opts prometheus.HistogramOpts, labelNames []string)
| 357 | // package but it automatically registers the HistogramVec with the Factory's |
| 358 | // Registerer. |
| 359 | func (f Factory) NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec { |
| 360 | h := prometheus.NewHistogramVec(opts, labelNames) |
| 361 | if f.r != nil { |
| 362 | f.r.MustRegister(h) |
| 363 | } |
| 364 | return h |
| 365 | } |
| 366 | |
| 367 | // NewUntypedFunc works like the function of the same name in the prometheus |
| 368 | // package but it automatically registers the UntypedFunc with the Factory's |