@@ -151,11 +151,12 @@ func TestWithCommandFilter(t *testing.T) {
151
151
}
152
152
})
153
153
154
- t .Run ("auth command filtered by default " , func (t * testing.T ) {
154
+ t .Run ("auth command filtered with basic command filter " , func (t * testing.T ) {
155
155
provider := sdktrace .NewTracerProvider ()
156
156
hook := newTracingHook (
157
157
"" ,
158
158
WithTracerProvider (provider ),
159
+ WithCommandFilter (BasicCommandFilter ),
159
160
)
160
161
ctx , span := provider .Tracer ("redis-test" ).Start (context .TODO (), "redis-test" )
161
162
cmd := redis .NewCmd (ctx , "auth" , "test-password" )
@@ -175,11 +176,12 @@ func TestWithCommandFilter(t *testing.T) {
175
176
}
176
177
})
177
178
178
- t .Run ("hello command filtered by default when sensitive" , func (t * testing.T ) {
179
+ t .Run ("hello command filtered with basic command filter when sensitive" , func (t * testing.T ) {
179
180
provider := sdktrace .NewTracerProvider ()
180
181
hook := newTracingHook (
181
182
"" ,
182
183
WithTracerProvider (provider ),
184
+ WithCommandFilter (BasicCommandFilter ),
183
185
)
184
186
ctx , span := provider .Tracer ("redis-test" ).Start (context .TODO (), "redis-test" )
185
187
cmd := redis .NewCmd (ctx , "hello" , 3 , "AUTH" , "test-user" , "test-password" )
@@ -199,11 +201,12 @@ func TestWithCommandFilter(t *testing.T) {
199
201
}
200
202
})
201
203
202
- t .Run ("hello command not filtered by default when not sensitive" , func (t * testing.T ) {
204
+ t .Run ("hello command not filtered with basic command filter when not sensitive" , func (t * testing.T ) {
203
205
provider := sdktrace .NewTracerProvider ()
204
206
hook := newTracingHook (
205
207
"" ,
206
208
WithTracerProvider (provider ),
209
+ WithCommandFilter (BasicCommandFilter ),
207
210
)
208
211
ctx , span := provider .Tracer ("redis-test" ).Start (context .TODO (), "redis-test" )
209
212
cmd := redis .NewCmd (ctx , "hello" , 3 )
0 commit comments