turn-off bucket usage metrics in gateway mode (#10150)

closes #10147
This commit is contained in:
Harshavardhana 2020-07-28 13:04:26 -07:00 committed by GitHub
parent b46ab7e921
commit 6669560cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -378,6 +378,10 @@ func bucketUsageMetricsPrometheus(ch chan<- prometheus.Metric) {
return
}
if globalIsGateway {
return
}
// Crawler disabled, nothing to do.
if env.Get(envDataUsageCrawlConf, config.EnableOn) != config.EnableOn {
return