@@ -151,11 +151,12 @@ func TestWithCommandFilter(t *testing.T) {
151151 }
152152 })
153153
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 ) {
155155 provider := sdktrace .NewTracerProvider ()
156156 hook := newTracingHook (
157157 "" ,
158158 WithTracerProvider (provider ),
159+ WithCommandFilter (BasicCommandFilter ),
159160 )
160161 ctx , span := provider .Tracer ("redis-test" ).Start (context .TODO (), "redis-test" )
161162 cmd := redis .NewCmd (ctx , "auth" , "test-password" )
@@ -175,11 +176,12 @@ func TestWithCommandFilter(t *testing.T) {
175176 }
176177 })
177178
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 ) {
179180 provider := sdktrace .NewTracerProvider ()
180181 hook := newTracingHook (
181182 "" ,
182183 WithTracerProvider (provider ),
184+ WithCommandFilter (BasicCommandFilter ),
183185 )
184186 ctx , span := provider .Tracer ("redis-test" ).Start (context .TODO (), "redis-test" )
185187 cmd := redis .NewCmd (ctx , "hello" , 3 , "AUTH" , "test-user" , "test-password" )
@@ -199,11 +201,12 @@ func TestWithCommandFilter(t *testing.T) {
199201 }
200202 })
201203
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 ) {
203205 provider := sdktrace .NewTracerProvider ()
204206 hook := newTracingHook (
205207 "" ,
206208 WithTracerProvider (provider ),
209+ WithCommandFilter (BasicCommandFilter ),
207210 )
208211 ctx , span := provider .Tracer ("redis-test" ).Start (context .TODO (), "redis-test" )
209212 cmd := redis .NewCmd (ctx , "hello" , 3 )
0 commit comments