Skip to content

Commit

Permalink
change %v to %s
Browse files Browse the repository at this point in the history
  • Loading branch information
huyan0 committed Aug 31, 2020
1 parent af53bb1 commit ee55f37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exporter/prometheusremotewriteexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {

Expand All @@ -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 {
Expand Down

0 comments on commit ee55f37

Please sign in to comment.