diff --git a/collector/collector.go b/collector/collector.go index 8ac695f..d7d93af 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -321,7 +321,7 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) { err = err1 } errmutex.Unlock() - level.Error(e.logger).Log("scrapeMetricContext", metric.Context, "ScrapeDuration", time.Since(scrapeStart), "msg", err.Error()) + level.Error(e.logger).Log("scrapeMetricContext", metric.Context, "ScrapeDuration", time.Since(scrapeStart), "msg", err1.Error()) e.scrapeErrors.WithLabelValues(metric.Context).Inc() } else { level.Debug(e.logger).Log("successfully scraped metric: ", metric.Context, metric.MetricsDesc, time.Since(scrapeStart))