diff --git a/exporter/prometheusremotewriteexporter/exporter.go b/exporter/prometheusremotewriteexporter/exporter.go index af46ff50fe0..c74f63dcc80 100644 --- a/exporter/prometheusremotewriteexporter/exporter.go +++ b/exporter/prometheusremotewriteexporter/exporter.go @@ -157,7 +157,7 @@ func (prwe *prwExporter) handleScalarMetric(tsMap map[string]*prompb.TimeSeries, // int points case otlp.MetricDescriptor_MONOTONIC_INT64, otlp.MetricDescriptor_INT64: if metric.Int64DataPoints == nil { - return fmt.Errorf("nil data point field in metric %v", metric.GetMetricDescriptor().Name) + return fmt.Errorf("nil data point field in metric %s", metric.GetMetricDescriptor().Name) } for _, pt := range metric.Int64DataPoints { @@ -177,7 +177,7 @@ func (prwe *prwExporter) handleScalarMetric(tsMap map[string]*prompb.TimeSeries, // double points case otlp.MetricDescriptor_MONOTONIC_DOUBLE, otlp.MetricDescriptor_DOUBLE: if metric.DoubleDataPoints == nil { - return fmt.Errorf("nil data point field in metric %v", metric.GetMetricDescriptor().Name) + return fmt.Errorf("nil data point field in metric %s", metric.GetMetricDescriptor().Name) } for _, pt := range metric.DoubleDataPoints { @@ -202,7 +202,7 @@ func (prwe *prwExporter) handleScalarMetric(tsMap map[string]*prompb.TimeSeries, func (prwe *prwExporter) handleHistogramMetric(tsMap map[string]*prompb.TimeSeries, metric *otlp.Metric) error { if metric.HistogramDataPoints == nil { - return fmt.Errorf("nil data point field in metric %v", metric.GetMetricDescriptor().Name) + return fmt.Errorf("nil data point field in metric %s", metric.GetMetricDescriptor().Name) } for _, pt := range metric.HistogramDataPoints {