2323from sentry_sdk import capture_message , start_transaction
2424from sentry_sdk .consts import SPANDATA
2525from sentry_sdk .integrations .asyncpg import AsyncPGIntegration
26- from sentry_sdk .tracing_utils import record_sql_queries_supporting_streaming
26+ from sentry_sdk .tracing_utils import record_sql_queries
2727from tests .conftest import ApproxDict
2828
2929PG_HOST = os .getenv ("SENTRY_PYTHON_TEST_POSTGRES_HOST" , "localhost" )
@@ -799,7 +799,7 @@ async def test_no_query_source_if_duration_too_short(
799799
800800 @contextmanager
801801 def fake_record_sql_queries_streaming (* args , ** kwargs ):
802- with record_sql_queries_supporting_streaming (* args , ** kwargs ) as span :
802+ with record_sql_queries (* args , ** kwargs ) as span :
803803 pass
804804 span ._start_timestamp = datetime .datetime (2024 , 1 , 1 , microsecond = 0 )
805805 if span_streaming :
@@ -812,7 +812,7 @@ def fake_record_sql_queries_streaming(*args, **kwargs):
812812 conn : Connection = await connect (PG_CONNECTION_URI )
813813
814814 with mock .patch (
815- "sentry_sdk.integrations.asyncpg.record_sql_queries_supporting_streaming " ,
815+ "sentry_sdk.integrations.asyncpg.record_sql_queries " ,
816816 fake_record_sql_queries_streaming ,
817817 ):
818818 await conn .execute (
@@ -842,14 +842,14 @@ def fake_record_sql_queries_streaming(*args, **kwargs):
842842
843843 @contextmanager
844844 def fake_record_sql_queries (* args , ** kwargs ):
845- with record_sql_queries_supporting_streaming (* args , ** kwargs ) as span :
845+ with record_sql_queries (* args , ** kwargs ) as span :
846846 pass
847847 span .start_timestamp = datetime .datetime (2024 , 1 , 1 , microsecond = 0 )
848848 span .timestamp = datetime .datetime (2024 , 1 , 1 , microsecond = 99999 )
849849 yield span
850850
851851 with mock .patch (
852- "sentry_sdk.integrations.asyncpg.record_sql_queries_supporting_streaming " ,
852+ "sentry_sdk.integrations.asyncpg.record_sql_queries " ,
853853 fake_record_sql_queries ,
854854 ):
855855 await conn .execute (
@@ -886,14 +886,14 @@ async def test_query_source_if_duration_over_threshold(sentry_init, capture_even
886886
887887 @contextmanager
888888 def fake_record_sql_queries (* args , ** kwargs ):
889- with record_sql_queries_supporting_streaming (* args , ** kwargs ) as span :
889+ with record_sql_queries (* args , ** kwargs ) as span :
890890 pass
891891 span .start_timestamp = datetime .datetime (2024 , 1 , 1 , microsecond = 0 )
892892 span .timestamp = datetime .datetime (2024 , 1 , 1 , microsecond = 100001 )
893893 yield span
894894
895895 with mock .patch (
896- "sentry_sdk.integrations.asyncpg.record_sql_queries_supporting_streaming " ,
896+ "sentry_sdk.integrations.asyncpg.record_sql_queries " ,
897897 fake_record_sql_queries ,
898898 ):
899899 await conn .execute (
0 commit comments