Update otel

This commit is contained in:
Vladimir Mihailenco 2020-03-13 16:36:05 +02:00
parent 61a78caa5d
commit 66cd13e793
3 changed files with 4 additions and 2 deletions

2
go.mod
View File

@ -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

2
go.sum
View File

@ -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=

View File

@ -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()),