diff --git a/exporter/prometheusremotewriteexporter/exporter.go b/exporter/prometheusremotewriteexporter/exporter.go index 040105bd95d..36f62bf8f2f 100644 --- a/exporter/prometheusremotewriteexporter/exporter.go +++ b/exporter/prometheusremotewriteexporter/exporter.go @@ -125,7 +125,7 @@ func (prwe *PrwExporter) PushMetrics(ctx context.Context, md pdata.Metrics) (int case otlp.MetricDescriptor_SUMMARY: if err := prwe.handleSummaryMetric(tsMap, metric); err != nil { dropped++ - errs = append(errs, err.Error()) + errs = append(errs, err) } default: dropped++ diff --git a/exporter/prometheusremotewriteexporter/exporter_test.go b/exporter/prometheusremotewriteexporter/exporter_test.go index d00a16adc4c..f1683894c28 100644 --- a/exporter/prometheusremotewriteexporter/exporter_test.go +++ b/exporter/prometheusremotewriteexporter/exporter_test.go @@ -774,7 +774,7 @@ func Test_PushMetrics(t *testing.T) { checkFunc, 3, http.StatusAccepted, - pdatautil.MetricCount(summaryBatch), + 0, false, }, } diff --git a/exporter/prometheusremotewriteexporter/testutil_test.go b/exporter/prometheusremotewriteexporter/testutil_test.go index bbacb85d31d..a583ede0820 100644 --- a/exporter/prometheusremotewriteexporter/testutil_test.go +++ b/exporter/prometheusremotewriteexporter/testutil_test.go @@ -30,11 +30,10 @@ type combination struct { } var ( - time1 = uint64(time.Now().UnixNano()) - time2 = uint64(time.Date(1970, 1, 0, 0, 0, 0, 0, time.UTC).UnixNano()) - msTime1 = int64(time1 / uint64(int64(time.Millisecond)/int64(time.Nanosecond))) - msTime2 = int64(time2 / uint64(int64(time.Millisecond)/int64(time.Nanosecond))) - testHeaders = map[string]string{"headerOne": "value1"} + time1 = uint64(time.Now().UnixNano()) + time2 = uint64(time.Date(1970, 1, 0, 0, 0, 0, 0, time.UTC).UnixNano()) + msTime1 = int64(time1 / uint64(int64(time.Millisecond)/int64(time.Nanosecond))) + msTime2 = int64(time2 / uint64(int64(time.Millisecond)/int64(time.Nanosecond))) typeInt64 = "INT64" typeMonotonicInt64 = "MONOTONIC_INT64"