Browse Source

refactor (tracing): move from github.com/pkg/errors to 'errors' and 'fmt' (#10819)

Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
pull/10811/head
Matthieu MOREL 2 years ago committed by GitHub
parent
commit
47e13b26c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      tracing/tracing.go

6
tracing/tracing.go

@ -15,12 +15,12 @@ package tracing
import (
"context"
"fmt"
"reflect"
"time"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/pkg/errors"
config_util "github.com/prometheus/common/config"
"github.com/prometheus/common/version"
"go.opentelemetry.io/otel"
@ -79,7 +79,7 @@ func (m *Manager) ApplyConfig(cfg *config.Config) error {
if m.shutdownFunc != nil {
if err := m.shutdownFunc(); err != nil {
return errors.Wrap(err, "failed to shut down the tracer provider")
return fmt.Errorf("failed to shut down the tracer provider: %w", err)
}
}
@ -94,7 +94,7 @@ func (m *Manager) ApplyConfig(cfg *config.Config) error {
tp, shutdownFunc, err := buildTracerProvider(context.Background(), cfg.TracingConfig)
if err != nil {
return errors.Wrap(err, "failed to install a new tracer provider")
return fmt.Errorf("failed to install a new tracer provider: %w", err)
}
m.shutdownFunc = shutdownFunc

Loading…
Cancel
Save