NewCounterVec works like the function of the same name in the prometheus package but it automatically registers the CounterVec with the Factory's Registerer.
(opts prometheus.CounterOpts, labelNames []string)
| 271 | // package but it automatically registers the CounterVec with the Factory's |
| 272 | // Registerer. |
| 273 | func (f Factory) NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec { |
| 274 | c := prometheus.NewCounterVec(opts, labelNames) |
| 275 | if f.r != nil { |
| 276 | f.r.MustRegister(c) |
| 277 | } |
| 278 | return c |
| 279 | } |
| 280 | |
| 281 | // NewCounterFunc works like the function of the same name in the prometheus |
| 282 | // package but it automatically registers the CounterFunc with the Factory's |