@@ -295,14 +295,12 @@ def test_engine_name_not_string(sentry_init):
295295
296296
297297def test_query_source_disabled (sentry_init , capture_events ):
298- sentry_options = {
299- "integrations" : [SqlalchemyIntegration ()],
300- "enable_tracing" : True ,
301- "enable_db_query_source" : False ,
302- "db_query_source_threshold_ms" : 0 ,
303- }
304-
305- sentry_init (** sentry_options )
298+ sentry_init (
299+ integrations = [SqlalchemyIntegration ()],
300+ traces_sample_rate = 1.0 ,
301+ enable_db_query_source = False ,
302+ db_query_source_threshold_ms = 0 ,
303+ )
306304
307305 events = capture_events ()
308306
@@ -348,7 +346,7 @@ class Person(Base):
348346def test_query_source_enabled (sentry_init , capture_events , enable_db_query_source ):
349347 sentry_options = {
350348 "integrations" : [SqlalchemyIntegration ()],
351- "enable_tracing " : True ,
349+ "traces_sample_rate " : 1.0 ,
352350 "db_query_source_threshold_ms" : 0 ,
353351 }
354352 if enable_db_query_source is not None :
@@ -399,7 +397,7 @@ class Person(Base):
399397def test_query_source (sentry_init , capture_events ):
400398 sentry_init (
401399 integrations = [SqlalchemyIntegration ()],
402- enable_tracing = True ,
400+ traces_sample_rate = 1.0 ,
403401 enable_db_query_source = True ,
404402 db_query_source_threshold_ms = 0 ,
405403 )
@@ -464,7 +462,7 @@ def test_query_source_with_module_in_search_path(sentry_init, capture_events):
464462 """
465463 sentry_init (
466464 integrations = [SqlalchemyIntegration ()],
467- enable_tracing = True ,
465+ traces_sample_rate = 1.0 ,
468466 enable_db_query_source = True ,
469467 db_query_source_threshold_ms = 0 ,
470468 )
@@ -527,7 +525,7 @@ class Person(Base):
527525def test_no_query_source_if_duration_too_short (sentry_init , capture_events ):
528526 sentry_init (
529527 integrations = [SqlalchemyIntegration ()],
530- enable_tracing = True ,
528+ traces_sample_rate = 1.0 ,
531529 enable_db_query_source = True ,
532530 db_query_source_threshold_ms = 100 ,
533531 )
@@ -595,7 +593,7 @@ def __exit__(self, type, value, traceback):
595593def test_query_source_if_duration_over_threshold (sentry_init , capture_events ):
596594 sentry_init (
597595 integrations = [SqlalchemyIntegration ()],
598- enable_tracing = True ,
596+ traces_sample_rate = 1.0 ,
599597 enable_db_query_source = True ,
600598 db_query_source_threshold_ms = 100 ,
601599 )
0 commit comments