From fa3d18b353e12d43ca7324183e5c9ca31729f251 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 18 Jul 2024 11:28:45 +0300 Subject: [PATCH] tracing commented redis.dial Signed-off-by: Vasiliy Tolstov --- tracer.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tracer.go b/tracer.go index 32aaada..bddbcaa 100644 --- a/tracer.go +++ b/tracer.go @@ -6,7 +6,7 @@ import ( "net" "strconv" - "github.com/redis/go-redis/extra/rediscmd/v9" + rediscmd "github.com/redis/go-redis/extra/rediscmd/v9" "github.com/redis/go-redis/v9" "go.unistack.org/micro/v3/tracer" ) @@ -53,11 +53,12 @@ func newTracingHook(connString string, tr tracer.Tracer, opts ...tracer.SpanOpti func (h *tracingHook) DialHook(hook redis.DialHook) redis.DialHook { return func(ctx context.Context, network, addr string) (net.Conn, error) { - _, span := h.tr.Start(ctx, "redis.dial", h.opts...) - defer span.Finish() - + /* + _, span := h.tr.Start(ctx, "redis.dial", h.opts...) + defer span.Finish() + */ conn, err := hook(ctx, network, addr) - recordError(span, err) + // recordError(span, err) return conn, err }