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>
This commit is contained in:
Matthieu MOREL 2022-06-08 10:44:42 +02:00 committed by GitHub
parent 554f3f32f8
commit 47e13b26c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -15,12 +15,12 @@ package tracing
import ( import (
"context" "context"
"fmt"
"reflect" "reflect"
"time" "time"
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/go-kit/log/level" "github.com/go-kit/log/level"
"github.com/pkg/errors"
config_util "github.com/prometheus/common/config" config_util "github.com/prometheus/common/config"
"github.com/prometheus/common/version" "github.com/prometheus/common/version"
"go.opentelemetry.io/otel" "go.opentelemetry.io/otel"
@ -79,7 +79,7 @@ func (m *Manager) ApplyConfig(cfg *config.Config) error {
if m.shutdownFunc != nil { if m.shutdownFunc != nil {
if err := m.shutdownFunc(); err != 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) tp, shutdownFunc, err := buildTracerProvider(context.Background(), cfg.TracingConfig)
if err != nil { 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 m.shutdownFunc = shutdownFunc