diff --git a/go/stats/prometheusbackend/prometheusbackend.go b/go/stats/prometheusbackend/prometheusbackend.go index 00a3b55222b..eb41af84015 100644 --- a/go/stats/prometheusbackend/prometheusbackend.go +++ b/go/stats/prometheusbackend/prometheusbackend.go @@ -4,12 +4,10 @@ import ( "expvar" "net/http" "strings" - "time" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "vitess.io/vitess/go/stats" - "vitess.io/vitess/go/vt/logutil" ) // PromBackend implements PullBackend using Prometheus as the backing metrics storage. @@ -18,15 +16,13 @@ type PromBackend struct { } var ( - be PromBackend - logUnsupported *logutil.ThrottledLogger + be PromBackend ) // Init initializes the Prometheus be with the given namespace. func Init(namespace string) { http.Handle("/metrics", promhttp.Handler()) be.namespace = namespace - logUnsupported = logutil.NewThrottledLogger("PrometheusUnsupportedMetricType", 1*time.Minute) stats.Register(be.publishPrometheusMetric) } @@ -67,9 +63,8 @@ func (be PromBackend) publishPrometheusMetric(name string, v expvar.Var) { newMultiTimingsCollector(st, be.buildPromName(name)) case *stats.Histogram: newHistogramCollector(st, be.buildPromName(name)) - default: - logUnsupported.Infof("Not exporting to Prometheus an unsupported metric type of %T: %s", st, name) } + // All other types of metrics are not currently collected and published to Prometheus } // buildPromName specifies the namespace as a prefix to the metric name