diff --git a/main.go b/main.go index 09b2e1e..007d626 100644 --- a/main.go +++ b/main.go @@ -85,7 +85,7 @@ func (e *Exporter) collectMetrics(stats *Stats, ch chan<- prometheus.Metric) { func (e *Exporter) collectTree(name string, data interface{}, labels prometheus.Labels, ch chan<- prometheus.Metric) { if v, ok := parseData(data); ok { if len(labels) == 0 { - metric := prometheus.NewGauge(prometheus.GaugeOpts{ + metric := prometheus.NewUntyped(prometheus.UntypedOpts{ Namespace: namespace, Name: name, }) @@ -96,7 +96,7 @@ func (e *Exporter) collectTree(name string, data interface{}, labels prometheus. for k := range labels { labelNames = append(labelNames, k) } - vec := prometheus.NewGaugeVec(prometheus.GaugeOpts{ + vec := prometheus.NewUntypedVec(prometheus.UntypedOpts{ Namespace: namespace, Name: name, }, labelNames) @@ -134,7 +134,7 @@ func (e *Exporter) collectFields(name string, data interface{}, labels prometheu for field, v := range fields { if v, ok := v.(float64); ok { - vec := prometheus.NewGaugeVec(prometheus.GaugeOpts{ + vec := prometheus.NewUntypedVec(prometheus.UntypedOpts{ Namespace: namespace, Name: name, }, append(labelNames, "field"))