From 0a88b1d1098c5a270406f2d9a27904eb7abd7c2b Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Tue, 6 Oct 2026 15:23:36 -0400 Subject: [PATCH] test(asgi, asyncio, aws_lambda): Remove redundant empty `data_collection` from sentry_init Refs PY-2936 --- tests/integrations/asgi/test_asgi.py | 5 ----- tests/integrations/asyncio/test_asyncio.py | 15 --------------- .../BasicOkSpanStreaming/index.py | 1 - .../RaiseErrorPerformanceDisabled/index.py | 1 - .../RaiseErrorPerformanceEnabled/index.py | 1 - .../RaiseErrorSpanStreaming/index.py | 1 - .../TimeoutErrorScopeModified/index.py | 1 - .../TracesSampler/index.py | 1 - 8 files changed, 26 deletions(-) diff --git a/tests/integrations/asgi/test_asgi.py b/tests/integrations/asgi/test_asgi.py index 80a84a0649..93a4cd9d8b 100644 --- a/tests/integrations/asgi/test_asgi.py +++ b/tests/integrations/asgi/test_asgi.py @@ -191,7 +191,6 @@ async def test_capture_transaction( capture_items, ): sentry_init( - data_collection={}, traces_sample_rate=1.0, ) app = SentryAsgiMiddleware(asgi3_app) @@ -225,7 +224,6 @@ async def test_capture_transaction_with_error( capture_items, ): sentry_init( - data_collection={}, traces_sample_rate=1.0, ) @@ -403,7 +401,6 @@ async def test_websocket( capture_items, ): sentry_init( - data_collection={}, traces_sample_rate=1.0, ) @@ -444,7 +441,6 @@ async def test_auto_session_tracking_with_aggregates( sentry_init, asgi3_app, capture_envelopes ): sentry_init( - data_collection={}, traces_sample_rate=1.0, ) app = SentryAsgiMiddleware(asgi3_app) @@ -490,7 +486,6 @@ async def test_fallback_segment_name_and_source( capture_items, ): sentry_init( - data_collection={}, traces_sample_rate=1.0, ) app = SentryAsgiMiddleware(asgi3_app) diff --git a/tests/integrations/asyncio/test_asyncio.py b/tests/integrations/asyncio/test_asyncio.py index e3a7e84521..a18f5cd4bc 100644 --- a/tests/integrations/asyncio/test_asyncio.py +++ b/tests/integrations/asyncio/test_asyncio.py @@ -69,7 +69,6 @@ async def test_create_task( ): sentry_init( traces_sample_rate=1.0, - data_collection={}, integrations=[AsyncioIntegration()], ) @@ -118,7 +117,6 @@ async def test_gather( ): sentry_init( traces_sample_rate=1.0, - data_collection={}, integrations=[AsyncioIntegration()], ) @@ -156,7 +154,6 @@ async def test_exception( ): sentry_init( traces_sample_rate=1.0, - data_collection={}, integrations=[AsyncioIntegration()], ) @@ -184,7 +181,6 @@ async def test_exception( async def test_task_result(sentry_init): sentry_init( integrations=[AsyncioIntegration()], - data_collection={}, ) async def add(a, b): @@ -202,7 +198,6 @@ async def test_task_with_context(sentry_init): """ sentry_init( integrations=[AsyncioIntegration()], - data_collection={}, ) var = ContextVar("var") @@ -374,7 +369,6 @@ async def test_span_origin( sentry_init( integrations=[AsyncioIntegration()], traces_sample_rate=1.0, - data_collection={}, ) items = capture_items("span") @@ -408,7 +402,6 @@ async def test_task_spans_false( sentry_init( traces_sample_rate=1.0, integrations=[AsyncioIntegration(task_spans=False)], - data_collection={}, ) items = capture_items("span") @@ -441,7 +434,6 @@ async def test_enable_asyncio_integration_with_task_spans_false( sentry_init( traces_sample_rate=1.0, - data_collection={}, ) assert "asyncio" not in sentry_sdk.get_client().integrations @@ -473,7 +465,6 @@ async def test_delayed_enable_integration( ): sentry_init( traces_sample_rate=1.0, - data_collection={}, ) assert "asyncio" not in sentry_sdk.get_client().integrations @@ -514,7 +505,6 @@ async def test_delayed_enable_integration( async def test_delayed_enable_integration_with_options(sentry_init): sentry_init( traces_sample_rate=1.0, - data_collection={}, ) assert "asyncio" not in sentry_sdk.get_client().integrations @@ -545,7 +535,6 @@ async def test_delayed_enable_enabled_integration(sentry_init, uninstall_integra sentry_init( integrations=[integration], traces_sample_rate=1.0, - data_collection={}, ) assert "asyncio" in sentry_sdk.get_client().integrations @@ -573,7 +562,6 @@ async def test_delayed_enable_integration_after_disabling( sentry_init( disabled_integrations=[AsyncioIntegration()], traces_sample_rate=1.0, - data_collection={}, ) assert "asyncio" not in sentry_sdk.get_client().integrations @@ -620,7 +608,6 @@ async def test_internal_tasks_not_wrapped( sentry_init( integrations=[AsyncioIntegration()], traces_sample_rate=1.0, - data_collection={}, ) async def user_task(): @@ -662,7 +649,6 @@ async def internal_task(): def test_loop_close_patching(sentry_init): sentry_init( integrations=[AsyncioIntegration()], - data_collection={}, ) loop = asyncio.new_event_loop() @@ -689,7 +675,6 @@ def test_loop_close_flushes_async_transport(sentry_init): sentry_init( integrations=[AsyncioIntegration()], - data_collection={}, ) # Save the current event loop to restore it later diff --git a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreaming/index.py b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreaming/index.py index 3a2cfeec85..4f82a4eb2b 100644 --- a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreaming/index.py +++ b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreaming/index.py @@ -5,7 +5,6 @@ sentry_sdk.init( dsn=os.environ.get("SENTRY_DSN"), - data_collection={}, traces_sample_rate=1.0, integrations=[AwsLambdaIntegration()], ) diff --git a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceDisabled/index.py b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceDisabled/index.py index 707234b95c..7669fb8aaf 100644 --- a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceDisabled/index.py +++ b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceDisabled/index.py @@ -5,7 +5,6 @@ sentry_sdk.init( dsn=os.environ.get("SENTRY_DSN"), - data_collection={}, traces_sample_rate=None, # this is the default, just added for clarity integrations=[AwsLambdaIntegration()], ) diff --git a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceEnabled/index.py b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceEnabled/index.py index e7dd016973..9503f04966 100644 --- a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceEnabled/index.py +++ b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceEnabled/index.py @@ -5,7 +5,6 @@ sentry_sdk.init( dsn=os.environ.get("SENTRY_DSN"), - data_collection={}, traces_sample_rate=1.0, integrations=[AwsLambdaIntegration()], ) diff --git a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorSpanStreaming/index.py b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorSpanStreaming/index.py index e7dd016973..9503f04966 100644 --- a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorSpanStreaming/index.py +++ b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorSpanStreaming/index.py @@ -5,7 +5,6 @@ sentry_sdk.init( dsn=os.environ.get("SENTRY_DSN"), - data_collection={}, traces_sample_rate=1.0, integrations=[AwsLambdaIntegration()], ) diff --git a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TimeoutErrorScopeModified/index.py b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TimeoutErrorScopeModified/index.py index 52fb73e47d..109245b90d 100644 --- a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TimeoutErrorScopeModified/index.py +++ b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TimeoutErrorScopeModified/index.py @@ -6,7 +6,6 @@ sentry_sdk.init( dsn=os.environ.get("SENTRY_DSN"), - data_collection={}, traces_sample_rate=1.0, integrations=[AwsLambdaIntegration(timeout_warning=True)], ) diff --git a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TracesSampler/index.py b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TracesSampler/index.py index 36ff898561..3e4d9b3c36 100644 --- a/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TracesSampler/index.py +++ b/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TracesSampler/index.py @@ -30,7 +30,6 @@ def trace_sampler(sampling_context): sentry_sdk.init( dsn=os.environ.get("SENTRY_DSN"), - data_collection={}, traces_sample_rate=1.0, traces_sampler=trace_sampler, integrations=[AwsLambdaIntegration()],