diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 9fcf6322a3..41bb93ff69 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -163,6 +163,8 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh - The `trace_ignore_status_codes` option was removed. - `add_attachment` no longer accepts an `add_to_transactions` argument. - The `stream_gen_ai_spans` option was removed. All spans are streamed now. +- The experimental `record_sql_params` option was removed. Use the `database_query_data` setting of `data_collection` instead. +- The `record_params` option of `AsyncPGIntegration` and `AioMySQLIntegration` was removed. Use the `database_query_data` setting of `data_collection` instead. ## Deprecated diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py index 4c47e4c155..ac7c72b661 100644 --- a/sentry_sdk/consts.py +++ b/sentry_sdk/consts.py @@ -65,7 +65,6 @@ class CompressionAlgo(Enum): "Experiments", { "max_flags": Optional[int], - "record_sql_params": Optional[bool], "continuous_profiling_auto_start": Optional[bool], "transport_zlib_compression_level": Optional[int], "transport_compression_level": Optional[int], diff --git a/sentry_sdk/integrations/aiomysql.py b/sentry_sdk/integrations/aiomysql.py index 687759fcdd..2cf18e1f44 100644 --- a/sentry_sdk/integrations/aiomysql.py +++ b/sentry_sdk/integrations/aiomysql.py @@ -13,7 +13,6 @@ ) from sentry_sdk.utils import ( capture_internal_exceptions, - has_data_collection_enabled, parse_version, ) @@ -28,10 +27,6 @@ class AioMySQLIntegration(Integration): identifier = "aiomysql" origin = f"auto.db.{identifier}" - _record_params = False - - def __init__(self, *, record_params: bool = False): - AioMySQLIntegration._record_params = record_params @staticmethod def setup_once() -> None: @@ -84,12 +79,7 @@ async def _inner(*args: Any, **kwargs: Any) -> T: integration = sentry_sdk.get_client().get_integration(AioMySQLIntegration) client = sentry_sdk.get_client() - should_record_params = False - if has_data_collection_enabled(client.options): - if client.options["data_collection"]["database_query_data"]: - should_record_params = True - else: - should_record_params = integration._record_params if integration else False + should_record_params = client.options["data_collection"]["database_query_data"] params_list = params if integration and should_record_params else None param_style = "pyformat" if params_list else None @@ -134,12 +124,7 @@ async def _inner(*args: Any, **kwargs: Any) -> T: integration = sentry_sdk.get_client().get_integration(AioMySQLIntegration) client = sentry_sdk.get_client() - should_record_params = False - if has_data_collection_enabled(client.options): - if client.options["data_collection"]["database_query_data"]: - should_record_params = True - else: - should_record_params = integration._record_params if integration else False + should_record_params = client.options["data_collection"]["database_query_data"] params_list = seq_of_params if integration and should_record_params else None param_style = "pyformat" if params_list else None diff --git a/sentry_sdk/integrations/asyncpg.py b/sentry_sdk/integrations/asyncpg.py index f4e7724510..f54b22816b 100644 --- a/sentry_sdk/integrations/asyncpg.py +++ b/sentry_sdk/integrations/asyncpg.py @@ -32,10 +32,6 @@ class AsyncPGIntegration(Integration): identifier = "asyncpg" origin = f"auto.db.{identifier}" - _record_params = False - - def __init__(self, *, record_params: bool = False): - AsyncPGIntegration._record_params = record_params @staticmethod def setup_once() -> None: @@ -114,7 +110,10 @@ def _record( ) -> "Iterator[Span]": client = sentry_sdk.get_client() integration = client.get_integration(AsyncPGIntegration) - if integration is not None and not integration._record_params: + if ( + integration is not None + and not client.options["data_collection"]["database_query_data"] + ): params_list = None param_style = "pyformat" if params_list else None diff --git a/sentry_sdk/tracing_utils.py b/sentry_sdk/tracing_utils.py index 7e5907d4ba..98684f5b75 100644 --- a/sentry_sdk/tracing_utils.py +++ b/sentry_sdk/tracing_utils.py @@ -124,27 +124,15 @@ def record_sql_queries( ) -> "Generator[sentry_sdk.traces.Span, None, None]": # TODO: Bring back capturing of params by default client = sentry_sdk.get_client() - if has_data_collection_enabled(client.options): - if client.options["data_collection"]["database_query_data"]: - if not params_list or params_list == [None]: - params_list = None - - if paramstyle == "pyformat": - paramstyle = "format" - else: + if client.options["data_collection"]["database_query_data"]: + if not params_list or params_list == [None]: params_list = None - paramstyle = None - else: - # TODO: remove this else block once data collection is released - if client.options["_experiments"].get("record_sql_params", False): - if not params_list or params_list == [None]: - params_list = None - if paramstyle == "pyformat": - paramstyle = "format" - else: - params_list = None - paramstyle = None + if paramstyle == "pyformat": + paramstyle = "format" + else: + params_list = None + paramstyle = None query = _format_sql(cursor, query) diff --git a/tests/integrations/aiomysql/test_aiomysql.py b/tests/integrations/aiomysql/test_aiomysql.py index f7c1ca0cab..53c2a207de 100644 --- a/tests/integrations/aiomysql/test_aiomysql.py +++ b/tests/integrations/aiomysql/test_aiomysql.py @@ -102,7 +102,7 @@ def _connect_args(): async def test_connect(sentry_init, capture_events) -> None: sentry_init( integrations=[AioMySQLIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -123,7 +123,7 @@ async def test_connect(sentry_init, capture_events) -> None: async def test_execute(sentry_init, capture_events) -> None: sentry_init( integrations=[AioMySQLIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -160,13 +160,19 @@ async def test_execute(sentry_init, capture_events) -> None: }, { "category": "query", - "data": {}, + "data": { + "db.params": ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + "db.paramstyle": "format", + }, "message": "INSERT INTO users(name, password, dob) VALUES (%s, %s, %s)", "type": "default", }, { "category": "query", - "data": {}, + "data": { + "db.params": ["Bob"], + "db.paramstyle": "format", + }, "message": "SELECT * FROM users WHERE name = %s", "type": "default", }, @@ -177,7 +183,6 @@ async def test_execute(sentry_init, capture_events) -> None: async def test_execute_many(sentry_init, capture_events) -> None: sentry_init( integrations=[AioMySQLIntegration()], - _experiments={"record_sql_params": True}, ) events = capture_events() @@ -260,47 +265,6 @@ async def test_execute_many_record_params_with_data_collection_enabled( ] -@pytest.mark.asyncio -async def test_execute_many_record_params_with_data_collection_disabled( - sentry_init, capture_events -) -> None: - sentry_init( - integrations=[AioMySQLIntegration(record_params=True)], - data_collection={"database_query_data": False}, - ) - events = capture_events() - - conn = await aiomysql.connect(**_connect_args()) - - async with conn.cursor() as cur: - await cur.executemany( - "INSERT INTO users(name, password, dob) VALUES (%s, %s, %s)", - [ - ("Bob", "secret_pw", datetime.date(1984, 3, 1)), - ("Alice", "pw", datetime.date(1990, 12, 25)), - ], - ) - - conn.close() - - capture_message("hi") - - (event,) = events - - for crumb in event["breadcrumbs"]["values"]: - del crumb["timestamp"] - - assert event["breadcrumbs"]["values"] == [ - CRUMBS_CONNECT, - { - "category": "query", - "data": {"db.executemany": True}, - "message": "INSERT INTO users(name, password, dob) VALUES (%s, %s, %s)", - "type": "default", - }, - ] - - @pytest.mark.asyncio async def test_execute_many_record_params_with_data_collection_default( sentry_init, capture_events @@ -354,7 +318,7 @@ async def test_execute_many_non_insert(sentry_init, capture_events) -> None: """Test executemany with non-INSERT queries (falls back to row-by-row).""" sentry_init( integrations=[AioMySQLIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -400,48 +364,7 @@ async def test_execute_many_non_insert(sentry_init, capture_events) -> None: @pytest.mark.asyncio -async def test_record_params(sentry_init, capture_events) -> None: - sentry_init( - integrations=[AioMySQLIntegration(record_params=True)], - _experiments={"record_sql_params": True}, - ) - events = capture_events() - - conn = await aiomysql.connect(**_connect_args()) - - async with conn.cursor() as cur: - await cur.execute( - "INSERT INTO users(name, password, dob) VALUES (%s, %s, %s)", - ("Bob", "secret_pw", datetime.date(1984, 3, 1)), - ) - - conn.close() - - capture_message("hi") - - (event,) = events - - for crumb in event["breadcrumbs"]["values"]: - del crumb["timestamp"] - - assert event["breadcrumbs"]["values"] == [ - CRUMBS_CONNECT, - { - "category": "query", - "data": { - "db.params": ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], - "db.paramstyle": "format", - }, - "message": "INSERT INTO users(name, password, dob) VALUES (%s, %s, %s)", - "type": "default", - }, - ] - - -@pytest.mark.asyncio -async def test_execute_record_params_with_data_collection_enabled( - sentry_init, capture_events -) -> None: +async def test_execute_record_params(sentry_init, capture_events) -> None: sentry_init( integrations=[AioMySQLIntegration()], data_collection={"database_query_data": True}, @@ -479,44 +402,6 @@ async def test_execute_record_params_with_data_collection_enabled( ] -@pytest.mark.asyncio -async def test_execute_record_params_with_data_collection_disabled( - sentry_init, capture_events -) -> None: - sentry_init( - integrations=[AioMySQLIntegration(record_params=True)], - data_collection={"database_query_data": False}, - ) - events = capture_events() - - conn = await aiomysql.connect(**_connect_args()) - - async with conn.cursor() as cur: - await cur.execute( - "INSERT INTO users(name, password, dob) VALUES (%s, %s, %s)", - ("Bob", "secret_pw", datetime.date(1984, 3, 1)), - ) - - conn.close() - - capture_message("hi") - - (event,) = events - - for crumb in event["breadcrumbs"]["values"]: - del crumb["timestamp"] - - assert event["breadcrumbs"]["values"] == [ - CRUMBS_CONNECT, - { - "category": "query", - "data": {}, - "message": "INSERT INTO users(name, password, dob) VALUES (%s, %s, %s)", - "type": "default", - }, - ] - - @pytest.mark.asyncio async def test_execute_record_params_with_data_collection_default( sentry_init, capture_events @@ -562,7 +447,7 @@ async def test_execute_record_params_with_data_collection_default( async def test_cursor_context_manager(sentry_init, capture_events) -> None: sentry_init( integrations=[AioMySQLIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -604,7 +489,7 @@ async def test_cursor_context_manager(sentry_init, capture_events) -> None: async def test_cursor_async_iteration(sentry_init, capture_events) -> None: sentry_init( integrations=[AioMySQLIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -637,7 +522,7 @@ async def test_cursor_async_iteration(sentry_init, capture_events) -> None: async def test_connection_pool(sentry_init, capture_events) -> None: sentry_init( integrations=[AioMySQLIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() diff --git a/tests/integrations/asyncpg/test_asyncpg.py b/tests/integrations/asyncpg/test_asyncpg.py index 83c49c66ac..2ef7993795 100644 --- a/tests/integrations/asyncpg/test_asyncpg.py +++ b/tests/integrations/asyncpg/test_asyncpg.py @@ -102,9 +102,7 @@ async def test_connect( ) -> None: sentry_init( integrations=[AsyncPGIntegration()], - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, ) items = capture_items("event") @@ -131,9 +129,7 @@ async def test_execute( ) -> None: sentry_init( integrations=[AsyncPGIntegration()], - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, ) items = capture_items("event") @@ -177,13 +173,16 @@ async def test_execute( }, { "category": "query", - "data": {}, + "data": { + "db.params": ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + "db.paramstyle": "format", + }, "message": "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", "type": "default", }, { "category": "query", - "data": {}, + "data": {"db.params": ["Bob"], "db.paramstyle": "format"}, "message": "SELECT * FROM users WHERE name = $1", "type": "default", }, @@ -203,9 +202,7 @@ async def test_execute_many( ) -> None: sentry_init( integrations=[AsyncPGIntegration()], - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, ) items = capture_items("event") @@ -226,43 +223,6 @@ async def test_execute_many( event = items[0].payload - for crumb in event["breadcrumbs"]["values"]: - del crumb["timestamp"] - - assert event["breadcrumbs"]["values"] == [ - CRUMBS_CONNECT, - { - "category": "query", - "data": {"db.executemany": True}, - "message": "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", - "type": "default", - }, - ] - - -@pytest.mark.asyncio -async def test_record_params(sentry_init, capture_events) -> None: - sentry_init( - integrations=[AsyncPGIntegration(record_params=True)], - _experiments={"record_sql_params": True}, - ) - events = capture_events() - - conn: Connection = await connect(PG_CONNECTION_URI) - - await conn.execute( - "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", - "Bob", - "secret_pw", - datetime.date(1984, 3, 1), - ) - - await conn.close() - - capture_message("hi") - - (event,) = events - for crumb in event["breadcrumbs"]["values"]: del crumb["timestamp"] @@ -271,8 +231,12 @@ async def test_record_params(sentry_init, capture_events) -> None: { "category": "query", "data": { - "db.params": ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + "db.params": [ + ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + ["Alice", "pw", "datetime.date(1990, 12, 25)"], + ], "db.paramstyle": "format", + "db.executemany": True, }, "message": "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", "type": "default", @@ -284,7 +248,7 @@ async def test_record_params(sentry_init, capture_events) -> None: async def test_cursor(sentry_init, capture_events) -> None: sentry_init( integrations=[AsyncPGIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -319,7 +283,14 @@ async def test_cursor(sentry_init, capture_events) -> None: CRUMBS_CONNECT, { "category": "query", - "data": {"db.executemany": True}, + "data": { + "db.params": [ + ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + ["Alice", "pw", "datetime.date(1990, 12, 25)"], + ], + "db.paramstyle": "format", + "db.executemany": True, + }, "message": "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", "type": "default", }, @@ -338,7 +309,7 @@ async def test_cursor(sentry_init, capture_events) -> None: async def test_cursor_manual(sentry_init, capture_events) -> None: sentry_init( integrations=[AsyncPGIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -375,7 +346,14 @@ async def test_cursor_manual(sentry_init, capture_events) -> None: CRUMBS_CONNECT, { "category": "query", - "data": {"db.executemany": True}, + "data": { + "db.params": [ + ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + ["Alice", "pw", "datetime.date(1990, 12, 25)"], + ], + "db.paramstyle": "format", + "db.executemany": True, + }, "message": "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", "type": "default", }, @@ -400,7 +378,7 @@ async def test_cursor_manual(sentry_init, capture_events) -> None: async def test_prepared_stmt(sentry_init, capture_events) -> None: sentry_init( integrations=[AsyncPGIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -432,7 +410,14 @@ async def test_prepared_stmt(sentry_init, capture_events) -> None: CRUMBS_CONNECT, { "category": "query", - "data": {"db.executemany": True}, + "data": { + "db.params": [ + ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + ["Alice", "pw", "datetime.date(1990, 12, 25)"], + ], + "db.paramstyle": "format", + "db.executemany": True, + }, "message": "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", "type": "default", }, @@ -449,7 +434,7 @@ async def test_prepared_stmt(sentry_init, capture_events) -> None: async def test_connection_pool(sentry_init, capture_events) -> None: sentry_init( integrations=[AsyncPGIntegration()], - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) events = capture_events() @@ -485,7 +470,10 @@ async def test_connection_pool(sentry_init, capture_events) -> None: *[CRUMBS_CONNECT] * pool_size, { "category": "query", - "data": {}, + "data": { + "db.params": ["Bob", "secret_pw", "datetime.date(1984, 3, 1)"], + "db.paramstyle": "format", + }, "message": "INSERT INTO users(name, password, dob) VALUES($1, $2, $3)", "type": "default", }, @@ -497,7 +485,7 @@ async def test_connection_pool(sentry_init, capture_events) -> None: }, { "category": "query", - "data": {}, + "data": {"db.params": ["Bob"], "db.paramstyle": "format"}, "message": "SELECT * FROM users WHERE name = $1", "type": "default", }, @@ -597,36 +585,6 @@ async def test_query_source_enabled( _assert_query_source(insert_span, "test_query_source_enabled") -@pytest.mark.asyncio -async def test_query_source(sentry_init, capture_items): - sentry_init( - integrations=[AsyncPGIntegration()], - traces_sample_rate=1.0, - enable_db_query_source=True, - db_query_source_threshold_ms=0, - ) - - items = capture_items("span") - with sentry_sdk.start_span(name="test_segment"): - conn: Connection = await connect(PG_CONNECTION_URI) - - await conn.execute( - "INSERT INTO users(name, password, dob) VALUES ('Alice', 'secret', '1990-12-25')", - ) - - await conn.close() - - sentry_sdk.flush() - - spans = [item.payload for item in items] - - assert len(spans) == 3 - - _, insert_span, _ = spans - - _assert_query_source(insert_span, "test_query_source") - - @pytest.mark.asyncio async def test_query_source_with_module_in_search_path( sentry_init, @@ -1111,7 +1069,7 @@ async def test_cursor_fetch_methods_create_spans( assert span["attributes"]["sentry.op"] == OP.DB_CURSOR_FETCH assert span["attributes"]["sentry.origin"] == "auto.db.asyncpg" - _assert_query_source( - span, - "test_cursor_fetch_methods_create_spans", - ) + _assert_query_source( + span, + "test_cursor_fetch_methods_create_spans", + ) diff --git a/tests/integrations/clickhouse_driver/test_clickhouse_driver.py b/tests/integrations/clickhouse_driver/test_clickhouse_driver.py index 5ddf9b1ab0..96a7371c74 100644 --- a/tests/integrations/clickhouse_driver/test_clickhouse_driver.py +++ b/tests/integrations/clickhouse_driver/test_clickhouse_driver.py @@ -22,7 +22,6 @@ def test_clickhouse_client_breadcrumbs(sentry_init, capture_events) -> None: sentry_init( integrations=[ClickhouseDriverIntegration()], data_collection={}, - _experiments={"record_sql_params": True}, ) events = capture_events() @@ -522,9 +521,6 @@ def test_clickhouse_client_spans( ): sentry_init( integrations=[ClickhouseDriverIntegration()], - _experiments={ - "record_sql_params": True, - }, traces_sample_rate=1.0, data_collection={}, ) @@ -758,9 +754,6 @@ def test_clickhouse_dbapi_spans( ): sentry_init( integrations=[ClickhouseDriverIntegration()], - _experiments={ - "record_sql_params": True, - }, traces_sample_rate=1.0, data_collection={}, ) diff --git a/tests/integrations/django/asgi/test_asgi.py b/tests/integrations/django/asgi/test_asgi.py index 4c49694e1a..297cd6a940 100644 --- a/tests/integrations/django/asgi/test_asgi.py +++ b/tests/integrations/django/asgi/test_asgi.py @@ -257,9 +257,7 @@ async def test_async_middleware_spans( sentry_init( integrations=[DjangoIntegration(middleware_spans=True)], traces_sample_rate=1.0, - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, ) application = make_asgi_application() diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index ebbc52672f..9b875e4694 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -473,8 +473,7 @@ def test_sql_queries( ): sentry_init( integrations=[DjangoIntegration()] if with_integration else [], - data_collection={}, - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) from django.db import connection @@ -508,8 +507,7 @@ def test_sql_dict_query_params( ): sentry_init( integrations=[DjangoIntegration()], - data_collection={}, - _experiments={"record_sql_params": True}, + data_collection={"database_query_data": True}, ) from django.db import connections @@ -585,10 +583,7 @@ def test_sql_psycopg2_string_composition( ): sentry_init( integrations=[DjangoIntegration()], - data_collection={}, - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, ) from django.db import connections @@ -623,10 +618,7 @@ def test_sql_psycopg2_placeholders( ): sentry_init( integrations=[DjangoIntegration()], - data_collection={}, - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, ) from django.db import connections @@ -735,7 +727,7 @@ def test_django_connect_breadcrumbs( """ sentry_init( integrations=[DjangoIntegration()], - data_collection={}, + data_collection={"database_query_data": True}, ) from django.db import connections @@ -778,7 +770,7 @@ def test_db_connection_span_data( ): sentry_init( integrations=[DjangoIntegration()], - data_collection={}, + data_collection={"database_query_data": True}, traces_sample_rate=1.0, ) diff --git a/tests/integrations/sqlalchemy/test_sqlalchemy.py b/tests/integrations/sqlalchemy/test_sqlalchemy.py index d4f0dca3aa..333cb80d2f 100644 --- a/tests/integrations/sqlalchemy/test_sqlalchemy.py +++ b/tests/integrations/sqlalchemy/test_sqlalchemy.py @@ -21,9 +21,7 @@ def test_orm_queries( ): sentry_init( integrations=[SqlalchemyIntegration()], - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, ) Base = declarative_base() # noqa: N806 @@ -87,9 +85,7 @@ def test_transactions( ): sentry_init( integrations=[SqlalchemyIntegration()], - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, traces_sample_rate=1.0, ) @@ -170,9 +166,7 @@ def test_transactions_no_engine_url( ): sentry_init( integrations=[SqlalchemyIntegration()], - _experiments={ - "record_sql_params": True, - }, + data_collection={"database_query_data": True}, traces_sample_rate=1.0, ) diff --git a/tests/test_tracing_utils.py b/tests/test_tracing_utils.py index 3098e73667..5e034d2f90 100644 --- a/tests/test_tracing_utils.py +++ b/tests/test_tracing_utils.py @@ -335,37 +335,11 @@ def _get_query_breadcrumb_data( {"db.params": [1, 2], "db.paramstyle": "format"}, id="data_collection_default_records_params", ), - pytest.param( - {"_experiments": {"record_sql_params": True}}, - {"db.params": [1, 2], "db.paramstyle": "format"}, - id="legacy_record_sql_params_on_records_params", - ), - pytest.param( - {"_experiments": {"record_sql_params": False}}, - {}, - id="legacy_record_sql_params_off_strips_params", - ), pytest.param( {}, {}, id="no_options_strips_params", ), - pytest.param( - { - "_experiments": {"record_sql_params": True}, - "data_collection": {"database_query_data": False}, - }, - {}, - id="data_collection_off_takes_precedence_over_legacy_on", - ), - pytest.param( - { - "_experiments": {"record_sql_params": False}, - "data_collection": {"database_query_data": True}, - }, - {"db.params": [1, 2], "db.paramstyle": "format"}, - id="data_collection_on_takes_precedence_over_legacy_off", - ), ), ) def test_record_sql_queries_data_collection(