From 66cd13e7934e0c6aa99e63cb62002c63abe2397b Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Fri, 13 Mar 2020 16:36:05 +0200 Subject: [PATCH] Update otel --- go.mod | 2 +- go.sum | 2 ++ internal/util.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 95ca399d..862e4d4e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/go-redis/redis/v8 require ( github.com/onsi/ginkgo v1.10.1 github.com/onsi/gomega v1.7.0 - go.opentelemetry.io/otel v0.2.3 + go.opentelemetry.io/otel v0.2.4-0.20200313034849-fcc4aca8c78d golang.org/x/net v0.0.0-20190923162816-aa69164e4478 // indirect golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect golang.org/x/text v0.3.2 // indirect diff --git a/go.sum b/go.sum index 0824181f..1e6f2b8d 100644 --- a/go.sum +++ b/go.sum @@ -45,6 +45,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= go.opentelemetry.io/otel v0.2.3 h1:o97YpRYk0PyhCyuanlJY0DepUgAlyzl3rJ+4kb+456c= go.opentelemetry.io/otel v0.2.3/go.mod h1:OgNpQOjrlt33Ew6Ds0mGjmcTQg/rhUctsbkRdk/g1fw= +go.opentelemetry.io/otel v0.2.4-0.20200313034849-fcc4aca8c78d h1:VDDfUPYIDsLOnr0a/xN5rY3cGs4iSAm6sSN700nQkf0= +go.opentelemetry.io/otel v0.2.4-0.20200313034849-fcc4aca8c78d/go.mod h1:OgNpQOjrlt33Ew6Ds0mGjmcTQg/rhUctsbkRdk/g1fw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/internal/util.go b/internal/util.go index 7bdd57ab..7cd10f0e 100644 --- a/internal/util.go +++ b/internal/util.go @@ -76,7 +76,7 @@ func WithSpan(ctx context.Context, name string, fn func(context.Context) error) defer span.End() if err := fn(ctx); err != nil { - span.SetStatus(codes.Internal) + span.SetStatus(codes.Internal, err.Error()) span.AddEvent(ctx, "error", logTypeKey.String(reflect.TypeOf(err).String()), logMessageKey.String(err.Error()),