NewCounter works like the function of the same name in the prometheus package but it automatically registers the Counter with the Factory's Registerer.
(opts prometheus.CounterOpts)
| 260 | // NewCounter works like the function of the same name in the prometheus package |
| 261 | // but it automatically registers the Counter with the Factory's Registerer. |
| 262 | func (f Factory) NewCounter(opts prometheus.CounterOpts) prometheus.Counter { |
| 263 | c := prometheus.NewCounter(opts) |
| 264 | if f.r != nil { |
| 265 | f.r.MustRegister(c) |
| 266 | } |
| 267 | return c |
| 268 | } |
| 269 | |
| 270 | // NewCounterVec works like the function of the same name in the prometheus |
| 271 | // package but it automatically registers the CounterVec with the Factory's |