func (f Factory) NewUntypedFunc(opts prometheus.UntypedOpts, function func() float64) prometheus.UntypedFunc {
	u := prometheus.NewUntypedFunc(opts, function)
	if f.r != nil {
		f.r.MustRegister(u)
	}
	return u
}
NewUntypedFunc works like the function of the same name in the prometheus
package but it automatically registers the UntypedFunc with the Factory's
Registerer.
package promauto
import "github.com/prometheus/client_golang/prometheus"
func NewCounter(opts prometheus.CounterOpts) prometheus.Counter {
	return With(prometheus.DefaultRegisterer).NewCounter(opts)
}
func NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec {
	return With(prometheus.DefaultRegisterer).NewCounterVec(opts, labelNames)
}
func NewCounterFunc(opts prometheus.CounterOpts, function func() float64) prometheus.CounterFunc {
	return With(prometheus.DefaultRegisterer).NewCounterFunc(opts, function)
}
func NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge {
	return With(prometheus.DefaultRegisterer).NewGauge(opts)
}
func NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *prometheus.GaugeVec {
	return With(prometheus.DefaultRegisterer).NewGaugeVec(opts, labelNames)
}
func NewGaugeFunc(opts prometheus.GaugeOpts, function func() float64) prometheus.GaugeFunc {
	return With(prometheus.DefaultRegisterer).NewGaugeFunc(opts, function)
}
func NewSummary(opts prometheus.SummaryOpts) prometheus.Summary {
	return With(prometheus.DefaultRegisterer).NewSummary(opts)
}
func NewSummaryVec(opts prometheus.SummaryOpts, labelNames []string) *prometheus.SummaryVec {
	return With(prometheus.DefaultRegisterer).NewSummaryVec(opts, labelNames)
}
func NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram {
	return With(prometheus.DefaultRegisterer).NewHistogram(opts)
}
func NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec {
	return With(prometheus.DefaultRegisterer).NewHistogramVec(opts, labelNames)
}
func NewUntypedFunc(opts prometheus.UntypedOpts, function func() float64) prometheus.UntypedFunc {
	return With(prometheus.DefaultRegisterer).NewUntypedFunc(opts, function)
}
type Factory struct {
	r prometheus.Registerer
}
func With(r prometheus.Registerer) Factory { return Factory{r} }
func (f Factory) NewCounter(opts prometheus.CounterOpts) prometheus.Counter {
	c := prometheus.NewCounter(opts)
	if f.r != nil {
		f.r.MustRegister(c)
	}
	return c
}
func (f Factory) NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec {
	c := prometheus.NewCounterVec(opts, labelNames)
	if f.r != nil {
		f.r.MustRegister(c)
	}
	return c
}
func (f Factory) NewCounterFunc(opts prometheus.CounterOpts, function func() float64) prometheus.CounterFunc {
	c := prometheus.NewCounterFunc(opts, function)
	if f.r != nil {
		f.r.MustRegister(c)
	}
	return c
}
func (f Factory) NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge {
	g := prometheus.NewGauge(opts)
	if f.r != nil {
		f.r.MustRegister(g)
	}
	return g
}
func (f Factory) NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *prometheus.GaugeVec {
	g := prometheus.NewGaugeVec(opts, labelNames)
	if f.r != nil {
		f.r.MustRegister(g)
	}
	return g
}
func (f Factory) NewGaugeFunc(opts prometheus.GaugeOpts, function func() float64) prometheus.GaugeFunc {
	g := prometheus.NewGaugeFunc(opts, function)
	if f.r != nil {
		f.r.MustRegister(g)
	}
	return g
}
func (f Factory) NewSummary(opts prometheus.SummaryOpts) prometheus.Summary {
	s := prometheus.NewSummary(opts)
	if f.r != nil {
		f.r.MustRegister(s)
	}
	return s
}
func (f Factory) NewSummaryVec(opts prometheus.SummaryOpts, labelNames []string) *prometheus.SummaryVec {
	s := prometheus.NewSummaryVec(opts, labelNames)
	if f.r != nil {
		f.r.MustRegister(s)
	}
	return s
}
func (f Factory) NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram {
	h := prometheus.NewHistogram(opts)
	if f.r != nil {
		f.r.MustRegister(h)
	}
	return h
}
func (f Factory) NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec {
	h := prometheus.NewHistogramVec(opts, labelNames)
	if f.r != nil {
		f.r.MustRegister(h)
	}
	return h
}