1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

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

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