mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
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:
parent
554f3f32f8
commit
47e13b26c1
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue