func readGauge(m prometheus.Gauge) float64 { // TODO: Revisit this once client_golang offers better testing tools. pb := &dto.Metric{} m.Write(pb) return pb.GetGauge().GetValue() }