@@ -401,20 +401,22 @@ def initialize(connection_string, *args)
401401 end
402402
403403 @observability = Observability ::Wrapper . new do |w |
404- if !( open_options [ :enable_tracing ] . nil? && !open_options [ :enable_tracing ] )
405- w . tracer = Tracing ::NoopTracer . new
406- elsif tracer . nil?
407- w . tracer = Tracing ::ThresholdLoggingTracer . new (
408- emit_interval : open_options [ :threshold_emit_interval ] ,
409- kv_threshold : open_options [ :key_value_threshold ] ,
410- query_threshold : open_options [ :query_threshold ] ,
411- views_threshold : open_options [ :view_threshold ] ,
412- search_threshold : open_options [ :search_threshold ] ,
413- analytics_threshold : open_options [ :analytics_threshold ] ,
414- management_threshold : open_options [ :management_threshold ] ,
415- sample_size : open_options [ :threshold_sample_size ] ,
416- )
417- end
404+ w . tracer = if !( open_options [ :enable_tracing ] . nil? && !open_options [ :enable_tracing ] )
405+ Tracing ::NoopTracer . new
406+ elsif tracer . nil?
407+ Tracing ::ThresholdLoggingTracer . new (
408+ emit_interval : open_options [ :threshold_emit_interval ] ,
409+ kv_threshold : open_options [ :key_value_threshold ] ,
410+ query_threshold : open_options [ :query_threshold ] ,
411+ views_threshold : open_options [ :view_threshold ] ,
412+ search_threshold : open_options [ :search_threshold ] ,
413+ analytics_threshold : open_options [ :analytics_threshold ] ,
414+ management_threshold : open_options [ :management_threshold ] ,
415+ sample_size : open_options [ :threshold_sample_size ] ,
416+ )
417+ else
418+ tracer
419+ end
418420 end
419421
420422 @backend = Backend . new
0 commit comments