@@ -91,10 +91,6 @@ func newTracingHook(connString string, opts ...TracingOption) *tracingHook {
91
91
92
92
func (th * tracingHook ) DialHook (hook redis.DialHook ) redis.DialHook {
93
93
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
-
98
94
ctx , span := th .conf .tracer .Start (ctx , "redis.dial" , th .spanOpts ... )
99
95
defer span .End ()
100
96
@@ -109,10 +105,6 @@ func (th *tracingHook) DialHook(hook redis.DialHook) redis.DialHook {
109
105
110
106
func (th * tracingHook ) ProcessHook (hook redis.ProcessHook ) redis.ProcessHook {
111
107
return func (ctx context.Context , cmd redis.Cmder ) error {
112
- if ! trace .SpanFromContext (ctx ).IsRecording () {
113
- return hook (ctx , cmd )
114
- }
115
-
116
108
fn , file , line := funcFileLine ("github.com/redis/go-redis" )
117
109
118
110
attrs := make ([]attribute.KeyValue , 0 , 8 )
@@ -145,10 +137,6 @@ func (th *tracingHook) ProcessPipelineHook(
145
137
hook redis.ProcessPipelineHook ,
146
138
) redis.ProcessPipelineHook {
147
139
return func (ctx context.Context , cmds []redis.Cmder ) error {
148
- if ! trace .SpanFromContext (ctx ).IsRecording () {
149
- return hook (ctx , cmds )
150
- }
151
-
152
140
fn , file , line := funcFileLine ("github.com/redis/go-redis" )
153
141
154
142
attrs := make ([]attribute.KeyValue , 0 , 8 )
0 commit comments