From e1aaaeb058939e2f3e2faa9d694bdd928f2ee78f Mon Sep 17 00:00:00 2001 From: Ziqi Zhao Date: Fri, 2 Dec 2022 10:09:37 +0800 Subject: [PATCH] Update exporters/prometheus/exporter.go Co-authored-by: Tyler Yahn --- exporters/prometheus/exporter.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exporters/prometheus/exporter.go b/exporters/prometheus/exporter.go index b434d080f87..b6f03f49966 100644 --- a/exporters/prometheus/exporter.go +++ b/exporters/prometheus/exporter.go @@ -391,7 +391,12 @@ func validateMetrics(name, description string, metricType *dto.MetricType, mfs m if emf.GetType() != *metricType && (emf.GetType() == dto.MetricType_HISTOGRAM || *metricType == dto.MetricType_HISTOGRAM) { return false, "" } - global.Info(fmt.Sprintf("the description %q of instrument %q conflicts with existing description %q, overriding with existing one", description, name, emf.GetHelp())) + global.Info( + "Instrument description conflict, using existing", + "instrument", name, + "existing", emf.GetHelp(), + "dropped", description, + ) return false, emf.GetHelp() } if emf.GetType() != *metricType {