From 717072db826b2375722fe913432097c9719870e7 Mon Sep 17 00:00:00 2001 From: tdakkota Date: Mon, 14 Oct 2024 18:51:22 +0300 Subject: [PATCH] chore: use formatted error message --- autometer/autometer.go | 2 +- autotracer/autotracer.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autometer/autometer.go b/autometer/autometer.go index d825570..d7474a4 100644 --- a/autometer/autometer.go +++ b/autometer/autometer.go @@ -142,7 +142,7 @@ func NewMeterProvider(ctx context.Context, options ...Option) ( enc := json.NewEncoder(writer) exp, err := stdoutmetric.New(stdoutmetric.WithEncoder(enc)) if err != nil { - return nil, nil, errors.Wrapf(err, exporter) + return nil, nil, errors.Wrapf(err, "create %q metric exporter", exporter) } return ret(sdkmetric.NewPeriodicReader(exp)) case expNone: diff --git a/autotracer/autotracer.go b/autotracer/autotracer.go index 92a360a..0f36746 100644 --- a/autotracer/autotracer.go +++ b/autotracer/autotracer.go @@ -108,7 +108,7 @@ func NewTracerProvider(ctx context.Context, options ...Option) ( } exp, err := stdouttrace.New(stdouttrace.WithWriter(writer)) if err != nil { - return nil, nil, errors.Wrap(err, exporter) + return nil, nil, errors.Wrapf(err, "create %q trace exporter", exporter) } return ret(exp) case expNone: