@@ -91,10 +91,6 @@ func newTracingHook(connString string, opts ...TracingOption) *tracingHook {
9191
9292func (th * tracingHook ) DialHook (hook redis.DialHook ) redis.DialHook {
9393 return func (ctx context.Context , network , addr string ) (net.Conn , error ) {
94- if ! trace .SpanFromContext (ctx ).IsRecording () {
95- return hook (ctx , network , addr )
96- }
97-
9894 ctx , span := th .conf .tracer .Start (ctx , "redis.dial" , th .spanOpts ... )
9995 defer span .End ()
10096
@@ -109,10 +105,6 @@ func (th *tracingHook) DialHook(hook redis.DialHook) redis.DialHook {
109105
110106func (th * tracingHook ) ProcessHook (hook redis.ProcessHook ) redis.ProcessHook {
111107 return func (ctx context.Context , cmd redis.Cmder ) error {
112- if ! trace .SpanFromContext (ctx ).IsRecording () {
113- return hook (ctx , cmd )
114- }
115-
116108 fn , file , line := funcFileLine ("github.com/redis/go-redis" )
117109
118110 attrs := make ([]attribute.KeyValue , 0 , 8 )
@@ -145,10 +137,6 @@ func (th *tracingHook) ProcessPipelineHook(
145137 hook redis.ProcessPipelineHook ,
146138) redis.ProcessPipelineHook {
147139 return func (ctx context.Context , cmds []redis.Cmder ) error {
148- if ! trace .SpanFromContext (ctx ).IsRecording () {
149- return hook (ctx , cmds )
150- }
151-
152140 fn , file , line := funcFileLine ("github.com/redis/go-redis" )
153141
154142 attrs := make ([]attribute.KeyValue , 0 , 8 )
0 commit comments