NewGauge works like the function of the same name in the prometheus package but it automatically registers the Gauge with the Factory's Registerer.
(opts prometheus.GaugeOpts)
| 292 | // NewGauge works like the function of the same name in the prometheus package |
| 293 | // but it automatically registers the Gauge with the Factory's Registerer. |
| 294 | func (f Factory) NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge { |
| 295 | g := prometheus.NewGauge(opts) |
| 296 | if f.r != nil { |
| 297 | f.r.MustRegister(g) |
| 298 | } |
| 299 | return g |
| 300 | } |
| 301 | |
| 302 | // NewGaugeVec works like the function of the same name in the prometheus |
| 303 | // package but it automatically registers the GaugeVec with the Factory's |