Skip to content

Commit

Permalink
Remove dependency on the old errors (#1668)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored Aug 29, 2020
1 parent fadd7d5 commit 4649b3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporter/prometheusremotewriteexporter/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
package prometheusremotewriteexporter

import (
"errors"
"log"
"sort"
"strings"
"time"
"unicode"

"github.com/pkg/errors"
"github.com/prometheus/prometheus/prompb"

common "go.opentelemetry.io/collector/internal/data/opentelemetry-proto-gen/common/v1"
Expand Down Expand Up @@ -186,7 +186,7 @@ func getPromMetricName(desc *otlp.MetricDescriptor, ns string) string {
// and creates a WriteRequest from the struct -- can move to the helper.go file
func wrapTimeSeries(tsMap map[string]*prompb.TimeSeries) (*prompb.WriteRequest, error) {
if len(tsMap) == 0 {
return nil, errors.Errorf("invalid tsMap: cannot be empty map")
return nil, errors.New("invalid tsMap: cannot be empty map")
}
TsArray := []prompb.TimeSeries{}
for _, v := range tsMap {
Expand Down

0 comments on commit 4649b3b

Please sign in to comment.