From 7566e499e1bf8c2c930c3b6342bb3a9e02ab64d0 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Tue, 6 Oct 2026 15:28:23 -0400 Subject: [PATCH 1/4] test(langgraph, litellm, litestar, mcp, openai, openai_agents, pyramid, requests, rq, starlette, starlite, stdlib, strawberry, wsgi): Remove redundant empty `data_collection` from sentry_init An empty `data_collection={}` is equivalent to the default, so passing it in these tests is redundant. Refs PY-2936 --- .../integrations/langgraph/test_langgraph.py | 2 +- tests/integrations/litellm/test_litellm.py | 26 +++++++------- tests/integrations/litestar/test_litestar.py | 20 +++++------ tests/integrations/mcp/test_mcp.py | 24 ++++++------- tests/integrations/openai/test_openai.py | 36 +++++++++---------- .../openai_agents/test_openai_agents.py | 20 +++++------ tests/integrations/pyramid/test_pyramid.py | 16 ++++----- tests/integrations/requests/test_requests.py | 6 ++-- tests/integrations/rq/test_rq.py | 20 +++++------ .../integrations/starlette/test_starlette.py | 12 +++---- tests/integrations/starlite/test_starlite.py | 12 +++---- tests/integrations/stdlib/test_httplib.py | 32 ++++++++--------- .../strawberry/test_strawberry.py | 8 ++--- tests/integrations/wsgi/test_wsgi.py | 20 +++++------ 14 files changed, 127 insertions(+), 127 deletions(-) diff --git a/tests/integrations/langgraph/test_langgraph.py b/tests/integrations/langgraph/test_langgraph.py index 6964bdba7f..4e043c1f50 100644 --- a/tests/integrations/langgraph/test_langgraph.py +++ b/tests/integrations/langgraph/test_langgraph.py @@ -802,7 +802,7 @@ def __init__(self, content, message_type="human"): def test_graph_bubble_up_ignored(sentry_init, capture_items): sentry_init( integrations=[LanggraphIntegration()], - data_collection={}, + ) events = capture_items("event") diff --git a/tests/integrations/litellm/test_litellm.py b/tests/integrations/litellm/test_litellm.py index 24ab55621b..02b4b4dc04 100644 --- a/tests/integrations/litellm/test_litellm.py +++ b/tests/integrations/litellm/test_litellm.py @@ -488,7 +488,7 @@ def test_streaming_chat_completion( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [ @@ -558,7 +558,7 @@ async def test_async_streaming_chat_completion( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [ @@ -1033,7 +1033,7 @@ def test_exception_handling( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1069,7 +1069,7 @@ async def test_async_exception_handling( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1106,7 +1106,7 @@ def test_span_origin( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1162,7 +1162,7 @@ def test_multiple_providers( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1264,7 +1264,7 @@ async def test_async_multiple_providers( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1367,7 +1367,7 @@ def test_additional_parameters( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1438,7 +1438,7 @@ async def test_async_additional_parameters( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1509,7 +1509,7 @@ def test_no_integration( sentry_init( disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1567,7 +1567,7 @@ async def test_async_no_integration( sentry_init( disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1624,7 +1624,7 @@ def test_response_without_usage( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) messages = [{"role": "user", "content": "Hello!"}] @@ -1667,7 +1667,7 @@ def test_integration_setup(sentry_init): integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) # Check that callbacks are registered diff --git a/tests/integrations/litestar/test_litestar.py b/tests/integrations/litestar/test_litestar.py index dd35230dee..f7a0405bf7 100644 --- a/tests/integrations/litestar/test_litestar.py +++ b/tests/integrations/litestar/test_litestar.py @@ -108,7 +108,7 @@ def test_catch_exceptions( ): sentry_init( integrations=[LitestarIntegration()], - data_collection={}, + ) litestar_app = litestar_app_factory() client = TestClient(litestar_app) @@ -155,7 +155,7 @@ def test_segment_name_and_source( sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - data_collection={}, + ) litestar_app = litestar_app_factory() client = TestClient(litestar_app) @@ -181,7 +181,7 @@ def test_middleware_spans( sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - data_collection={}, + ) logging_config = LoggingMiddlewareConfig() @@ -238,7 +238,7 @@ async def do_stuff(message): sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - data_collection={}, + ) litestar_app = litestar_app_factory(middleware=[SampleMiddleware]) @@ -319,7 +319,7 @@ async def __call__(self, scope, receive, send): sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - data_collection={}, + ) litestar_app = litestar_app_factory(middleware=[SampleReceiveSendMiddleware]) @@ -355,7 +355,7 @@ async def my_send(*args, **kwargs): sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - data_collection={}, + ) litestar_app = litestar_app_factory(middleware=[SamplePartialReceiveSendMiddleware]) @@ -425,7 +425,7 @@ def test_span_origin( sentry_init( integrations=[LitestarIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) logging_config = LoggingMiddlewareConfig() @@ -644,7 +644,7 @@ def test_configurable_status_codes_handler( ) sentry_init( integrations=[LitestarIntegration(**integration_kwargs)], - data_collection={}, + ) @get("/error") @@ -678,7 +678,7 @@ def test_configurable_status_codes_middleware( sentry_init( integrations=[LitestarIntegration(**integration_kwargs)], - data_collection={}, + ) def create_raising_middleware(app): @@ -707,7 +707,7 @@ def test_catch_non_http_exceptions_in_middleware( ): sentry_init( integrations=[LitestarIntegration()], - data_collection={}, + ) def create_raising_middleware(app): diff --git a/tests/integrations/mcp/test_mcp.py b/tests/integrations/mcp/test_mcp.py index ed7946a64d..222acb541a 100644 --- a/tests/integrations/mcp/test_mcp.py +++ b/tests/integrations/mcp/test_mcp.py @@ -142,7 +142,7 @@ async def test_tool_handler_constructor_registration(sentry_init, capture_items, sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) async def test_tool(ctx, params): @@ -185,7 +185,7 @@ async def test_mcpserver_high_level_tool_instrumented( sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) mcp_server = MCPServer("test-server") @@ -217,7 +217,7 @@ async def test_wrapping_handler_is_idempotent(sentry_init, capture_items, stdio) sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) async def test_tool(ctx, params): @@ -554,7 +554,7 @@ async def test_tool_handler_stateless_streamable_http( sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -602,7 +602,7 @@ async def test_tool_handler_with_error(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -936,7 +936,7 @@ async def test_prompt_handler_with_error(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -977,7 +977,7 @@ async def test_resource_handler_stdio(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -1034,7 +1034,7 @@ async def test_resource_handler_streamable_http(sentry_init, capture_items, json sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -1097,7 +1097,7 @@ async def test_resource_handler_with_error(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -1338,7 +1338,7 @@ async def test_multiple_handlers(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -1590,7 +1590,7 @@ async def test_sse_transport_detection_v2(sentry_init, capture_items, json_rpc_s sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") @@ -1668,7 +1668,7 @@ async def test_streamable_http_scope_propagation(sentry_init, capture_items, jso sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) server = Server("test-server") diff --git a/tests/integrations/openai/test_openai.py b/tests/integrations/openai/test_openai.py index 46843d81b3..9fdd10f095 100644 --- a/tests/integrations/openai/test_openai.py +++ b/tests/integrations/openai/test_openai.py @@ -1756,7 +1756,7 @@ def test_bad_chat_completion( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") @@ -1785,7 +1785,7 @@ def test_span_status_error( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") @@ -1816,7 +1816,7 @@ async def test_bad_chat_completion_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = AsyncOpenAI(api_key="z") @@ -2189,7 +2189,7 @@ def test_embeddings_create_raises_error( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -2218,7 +2218,7 @@ async def test_embeddings_create_raises_error_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = AsyncOpenAI(api_key="z") @@ -2246,7 +2246,7 @@ def test_span_origin_nonstreaming_chat( sentry_init( integrations=[OpenAIIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -2284,7 +2284,7 @@ async def test_span_origin_nonstreaming_chat_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = AsyncOpenAI(api_key="z") @@ -2320,7 +2320,7 @@ def test_span_origin_streaming_chat( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -2384,7 +2384,7 @@ async def test_span_origin_streaming_chat_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = AsyncOpenAI(api_key="z") @@ -2453,7 +2453,7 @@ def test_span_origin_embeddings( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -2487,7 +2487,7 @@ async def test_span_origin_embeddings_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = AsyncOpenAI(api_key="z") @@ -3178,7 +3178,7 @@ def test_responses_api_conversation_id( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -3220,7 +3220,7 @@ def test_responses_api_reasoning_level( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -4151,7 +4151,7 @@ def test_chat_completion_reasoning_level( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -4270,7 +4270,7 @@ def test_streaming_chat_completion_ttft( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -4351,7 +4351,7 @@ async def test_streaming_chat_completion_ttft_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = AsyncOpenAI(api_key="z") @@ -4433,7 +4433,7 @@ def test_streaming_responses_api_ttft( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = OpenAI(api_key="z") @@ -4485,7 +4485,7 @@ async def test_streaming_responses_api_ttft_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) client = AsyncOpenAI(api_key="z") diff --git a/tests/integrations/openai_agents/test_openai_agents.py b/tests/integrations/openai_agents/test_openai_agents.py index 0e0e74d8cd..496f982686 100644 --- a/tests/integrations/openai_agents/test_openai_agents.py +++ b/tests/integrations/openai_agents/test_openai_agents.py @@ -858,7 +858,7 @@ async def test_client_span_custom_model( integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("span") @@ -1854,7 +1854,7 @@ async def test_hosted_mcp_tool_propagation_header_streamed( integrations=[OpenAIAgentsIntegration()], traces_sample_rate=1.0, release="d08ebdb9309e1b004c6f52202de58a09c2268e42", - data_collection={}, + ) request_headers = {"X-Stainless-Raw-Response": "stream"} @@ -2022,7 +2022,7 @@ async def test_hosted_mcp_tool_propagation_headers( integrations=[OpenAIAgentsIntegration()], traces_sample_rate=1.0, release="d08ebdb9309e1b004c6f52202de58a09c2268e42", - data_collection={}, + ) response = get_model_response(EXAMPLE_RESPONSE, serialize_pydantic=True) @@ -2179,7 +2179,7 @@ async def test_run_error_handling( ], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") @@ -2231,7 +2231,7 @@ async def test_run_streamed_error_handling( ], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") @@ -2348,7 +2348,7 @@ async def test_span_status_error( ], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") @@ -2687,7 +2687,7 @@ async def test_ai_client_span_response_model_with_chat_completions( integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("span") @@ -3025,7 +3025,7 @@ async def test_streaming_ttft_on_chat_span( sentry_init( integrations=[OpenAIAgentsIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) request_headers = {"X-Stainless-Raw-Response": "stream"} @@ -3183,7 +3183,7 @@ async def test_conversation_id_on_all_spans( integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("span") @@ -3317,7 +3317,7 @@ def simple_tool(message: str) -> str: integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("span") diff --git a/tests/integrations/pyramid/test_pyramid.py b/tests/integrations/pyramid/test_pyramid.py index 77dcbedaf3..653638e1ed 100644 --- a/tests/integrations/pyramid/test_pyramid.py +++ b/tests/integrations/pyramid/test_pyramid.py @@ -133,7 +133,7 @@ def test_segment_name_and_source( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") @@ -158,7 +158,7 @@ def test_http_route( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("span") @@ -180,7 +180,7 @@ def test_large_json_request( integrations=[PyramidIntegration()], max_request_body_size="always", max_value_length=max_value_length, - data_collection={}, + ) data = {"foo": {"bar": "a" * (1034)}} @@ -240,7 +240,7 @@ def test_json_not_truncated_if_max_request_body_size_is_always( sentry_init( integrations=[PyramidIntegration()], max_request_body_size="always", - data_collection={}, + ) data = { @@ -271,7 +271,7 @@ def test_files_and_form( integrations=[PyramidIntegration()], max_request_body_size="always", max_value_length=max_value_length, - data_collection={}, + ) data = { @@ -411,7 +411,7 @@ def test_error_in_authenticated_userid( PyramidIntegration(), LoggingIntegration(event_level=logging.ERROR), ], - data_collection={}, + ) logger = logging.getLogger("test_pyramid") @@ -481,7 +481,7 @@ def test_tracing_error( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") @@ -521,7 +521,7 @@ def test_span_origin( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("event", "span") diff --git a/tests/integrations/requests/test_requests.py b/tests/integrations/requests/test_requests.py index d0036eb062..9f26fa6d3a 100644 --- a/tests/integrations/requests/test_requests.py +++ b/tests/integrations/requests/test_requests.py @@ -14,7 +14,7 @@ def test_crumb_capture(sentry_init, capture_events): sentry_init( integrations=[StdlibIntegration()], - data_collection={}, + ) events = capture_events() @@ -49,7 +49,7 @@ def test_crumb_capture(sentry_init, capture_events): def test_crumb_capture_client_error(sentry_init, capture_events, status_code, level): sentry_init( integrations=[StdlibIntegration()], - data_collection={}, + ) events = capture_events() @@ -84,7 +84,7 @@ def test_crumb_capture_client_error(sentry_init, capture_events, status_code, le def test_omit_url_data_if_parsing_fails(sentry_init, capture_events): sentry_init( integrations=[StdlibIntegration()], - data_collection={}, + ) events = capture_events() diff --git a/tests/integrations/rq/test_rq.py b/tests/integrations/rq/test_rq.py index e6c79a9ccd..345928cf76 100644 --- a/tests/integrations/rq/test_rq.py +++ b/tests/integrations/rq/test_rq.py @@ -53,7 +53,7 @@ def test_basic( ): sentry_init( integrations=[RqIntegration()], - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -124,7 +124,7 @@ def test_transport_shutdown( ): sentry_init( integrations=[RqIntegration()], - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -149,7 +149,7 @@ def test_worker_span_with_error( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -194,7 +194,7 @@ def test_error_has_trace_context_if_tracing_disabled( ): sentry_init( integrations=[RqIntegration()], - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -216,7 +216,7 @@ def test_tracing_enabled( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -257,7 +257,7 @@ def test_tracing_disabled( ): sentry_init( integrations=[RqIntegration()], - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -279,7 +279,7 @@ def test_worker_span_no_error( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -309,7 +309,7 @@ def test_traces_sampler_gets_correct_values_in_sampling_context( sentry_init( integrations=[RqIntegration()], traces_sampler=traces_sampler, - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -345,7 +345,7 @@ def test_job_with_retries( ): sentry_init( integrations=[RqIntegration()], - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) @@ -366,7 +366,7 @@ def test_span_origin( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) queue = rq.Queue(connection=FakeRedis()) diff --git a/tests/integrations/starlette/test_starlette.py b/tests/integrations/starlette/test_starlette.py index 577f30c0c8..8b48bd6b71 100644 --- a/tests/integrations/starlette/test_starlette.py +++ b/tests/integrations/starlette/test_starlette.py @@ -291,7 +291,7 @@ async def my_send(*args, **kwargs): async def test_request_info_json_body(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + integrations=[StarletteIntegration()], ) @@ -332,7 +332,7 @@ async def test_request_info_json_body(sentry_init, capture_items): async def test_formdata_request_body(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + max_request_body_size="always", integrations=[StarletteIntegration()], ) @@ -377,7 +377,7 @@ async def test_formdata_request_body(sentry_init, capture_items): async def test_request_body_too_big(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + integrations=[StarletteIntegration()], ) @@ -982,7 +982,7 @@ def test_user_information_does_not_clobber_app_set_user(sentry_init, capture_eve """ sentry_init( traces_sample_rate=1.0, - data_collection={}, + integrations=[StarletteIntegration()], ) @@ -1590,7 +1590,7 @@ def test_segment_http_method_default(sentry_init, capture_items): def test_request_url(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + integrations=[ StarletteIntegration(), ], @@ -1689,7 +1689,7 @@ async def _error(_): async def test_malformed_json_request_body(sentry_init, capture_events): sentry_init( traces_sample_rate=1.0, - data_collection={}, + integrations=[StarletteIntegration()], ) diff --git a/tests/integrations/starlite/test_starlite.py b/tests/integrations/starlite/test_starlite.py index de0e58ccc5..b1e97c9130 100644 --- a/tests/integrations/starlite/test_starlite.py +++ b/tests/integrations/starlite/test_starlite.py @@ -146,7 +146,7 @@ def test_transaction_name_and_source( sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - data_collection={}, + ) starlite_app = starlite_app_factory() client = TestClient(starlite_app) @@ -169,7 +169,7 @@ def test_middleware_spans(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - data_collection={}, + ) logging_config = LoggingMiddlewareConfig() @@ -224,7 +224,7 @@ async def do_stuff(message): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - data_collection={}, + ) starlite_app = starlite_app_factory(middleware=[SampleMiddleware]) @@ -286,7 +286,7 @@ async def __call__(self, scope, receive, send): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - data_collection={}, + ) starlite_app = starlite_app_factory(middleware=[SampleReceiveSendMiddleware]) @@ -319,7 +319,7 @@ async def my_send(*args, **kwargs): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - data_collection={}, + ) starlite_app = starlite_app_factory(middleware=[SamplePartialReceiveSendMiddleware]) @@ -370,7 +370,7 @@ def test_span_origin(sentry_init, capture_items): sentry_init( integrations=[StarliteIntegration()], traces_sample_rate=1.0, - data_collection={}, + ) logging_config = LoggingMiddlewareConfig() diff --git a/tests/integrations/stdlib/test_httplib.py b/tests/integrations/stdlib/test_httplib.py index 1fb344fb0c..d4c4695b03 100644 --- a/tests/integrations/stdlib/test_httplib.py +++ b/tests/integrations/stdlib/test_httplib.py @@ -79,7 +79,7 @@ def create_chunked_server(): def test_crumb_capture(sentry_init, capture_events): sentry_init( integrations=[StdlibIntegration()], - data_collection={}, + ) events = capture_events() @@ -115,7 +115,7 @@ def test_crumb_capture(sentry_init, capture_events): def test_crumb_capture_client_error(sentry_init, capture_events, status_code, level): sentry_init( integrations=[StdlibIntegration()], - data_collection={}, + ) events = capture_events() @@ -239,7 +239,7 @@ def test_httplib_misuse(sentry_init, capture_events, request): def test_outgoing_trace_headers(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + ) already_patched_getresponse = HTTPSConnection.getresponse @@ -312,7 +312,7 @@ def test_outgoing_trace_headers_head_sdk(sentry_init, capture_items): sentry_init( traces_sample_rate=0.5, release="foo", - data_collection={}, + ) already_patched_getresponse = HTTPSConnection.getresponse @@ -374,7 +374,7 @@ def test_outgoing_trace_headers_no_current_span(sentry_init): """ sentry_init( traces_sample_rate=1.0, - data_collection={}, + ) already_patched_getresponse = HTTPSConnection.getresponse @@ -503,7 +503,7 @@ def test_option_trace_propagation_targets( sentry_init( trace_propagation_targets=trace_propagation_targets, traces_sample_rate=1.0, - data_collection={}, + ) already_patched_getresponse = HTTPSConnection.getresponse @@ -557,7 +557,7 @@ def test_request_source_disabled(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=False, http_request_source_threshold_ms=0, - data_collection={}, + ) items = capture_items("span") @@ -590,7 +590,7 @@ def test_request_source_enabled(sentry_init, capture_items, enable_http_request_ sentry_init( traces_sample_rate=1.0, http_request_source_threshold_ms=0, - data_collection={}, + **kwargs, ) @@ -618,7 +618,7 @@ def test_request_source(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=0, - data_collection={}, + ) items = capture_items("span") @@ -664,7 +664,7 @@ def test_request_source_with_module_in_search_path(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=0, - data_collection={}, + ) items = capture_items("span") @@ -703,7 +703,7 @@ def test_no_request_source_if_duration_too_short(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=100, - data_collection={}, + ) add_http_request_source = sentry_sdk.tracing_utils.add_http_request_source @@ -742,7 +742,7 @@ def test_request_source_if_duration_over_threshold(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=100, - data_collection={}, + ) add_http_request_source = sentry_sdk.tracing_utils.add_http_request_source @@ -799,7 +799,7 @@ def add_http_request_source_with_pinned_timestamps(span): def test_span_origin(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + debug=True, ) items = capture_items("span") @@ -823,7 +823,7 @@ def test_http_timeout(monkeypatch, sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("span") @@ -850,7 +850,7 @@ def test_http_timeout(monkeypatch, sentry_init, capture_items): def test_proxy_http_tunnel(sentry_init, capture_items, tunnel_port): sentry_init( traces_sample_rate=1.0, - data_collection={}, + ) items = capture_items("span") @@ -884,7 +884,7 @@ def test_proxy_http_tunnel(sentry_init, capture_items, tunnel_port): def test_chunked_response_span_covers_body_read(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - data_collection={}, + ) min_expected_duration = CHUNK_DELAY * NUM_CHUNKS diff --git a/tests/integrations/strawberry/test_strawberry.py b/tests/integrations/strawberry/test_strawberry.py index 057b231f81..cbd3890904 100644 --- a/tests/integrations/strawberry/test_strawberry.py +++ b/tests/integrations/strawberry/test_strawberry.py @@ -484,7 +484,7 @@ def test_capture_segment_on_error( framework_integrations, ): sentry_init( - data_collection={}, + integrations=[ StrawberryIntegration(async_execution=async_execution), ] @@ -550,7 +550,7 @@ def test_capture_segment_on_success( ] + framework_integrations, traces_sample_rate=1, - data_collection={}, + ) items = capture_items("span") @@ -608,7 +608,7 @@ def test_segment_no_operation_name( ] + framework_integrations, traces_sample_rate=1, - data_collection={}, + ) items = capture_items("span") @@ -665,7 +665,7 @@ def test_segment_mutation( ] + framework_integrations, traces_sample_rate=1, - data_collection={}, + ) items = capture_items("span") diff --git a/tests/integrations/wsgi/test_wsgi.py b/tests/integrations/wsgi/test_wsgi.py index 8c49472c92..fce545422d 100644 --- a/tests/integrations/wsgi/test_wsgi.py +++ b/tests/integrations/wsgi/test_wsgi.py @@ -144,7 +144,7 @@ def dogpark(environ, start_response): raise ValueError("Fetch aborted. The ball was not returned.") sentry_init( - data_collection={}, + traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -244,7 +244,7 @@ def dogpark(environ, start_response): raise ValueError("Fetch aborted. The ball was not returned.") sentry_init( - data_collection={}, + traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -314,7 +314,7 @@ def dogpark(environ, start_response): raise ValueError("Fetch aborted. The ball was not returned.") sentry_init( - data_collection={}, + traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -383,7 +383,7 @@ def app(environ, start_response): traces_sampler = mock.Mock(return_value=True) sentry_init( - data_collection={}, + traces_sampler=traces_sampler, ) app = SentryWsgiMiddleware(app) @@ -426,7 +426,7 @@ def app(environ, start_response): traces_sampler = mock.Mock(return_value=True) sentry_init( - data_collection={}, + traces_sampler=traces_sampler, ) app = SentryWsgiMiddleware(app) @@ -468,7 +468,7 @@ def sample_app(environ, start_response): traces_sampler = mock.Mock(return_value=True) sentry_init( - data_collection={}, + traces_sampler=traces_sampler, ) app = SentryWsgiMiddleware(sample_app) @@ -510,7 +510,7 @@ def dogpark(environ, start_response): return ["Go get the ball! Good dog!"] sentry_init( - data_collection={}, + traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -532,7 +532,7 @@ def dogpark(environ, start_response): return ["Go get the ball! Good dog!"] sentry_init( - data_collection={}, + traces_sample_rate=1.0, ) app = SentryWsgiMiddleware( @@ -1032,7 +1032,7 @@ def dogpark(environ, start_response): start_response("200 OK", []) return ["woof"] - sentry_init(data_collection={}, traces_sample_rate=1.0) + sentry_init( traces_sample_rate=1.0) app = SentryWsgiMiddleware(dogpark) client = Client(app) @@ -1057,7 +1057,7 @@ def dogpark(environ, start_response): return ["woof"] sentry_init( - data_collection={}, + traces_sample_rate=1.0, ) From d9476015e2a1057410a87859d0d86d87697009fa Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Tue, 6 Oct 2026 15:31:43 -0400 Subject: [PATCH 2/4] . --- tests/integrations/langgraph/test_langgraph.py | 1 - tests/integrations/litellm/test_litellm.py | 13 ------------- tests/integrations/litestar/test_litestar.py | 10 ---------- tests/integrations/mcp/test_mcp.py | 12 ------------ tests/integrations/openai/test_openai.py | 18 ------------------ .../openai_agents/test_openai_agents.py | 10 ---------- tests/integrations/pyramid/test_pyramid.py | 8 -------- tests/integrations/requests/test_requests.py | 3 --- tests/integrations/rq/test_rq.py | 10 ---------- tests/integrations/starlette/test_starlette.py | 6 ------ tests/integrations/starlite/test_starlite.py | 6 ------ tests/integrations/stdlib/test_httplib.py | 16 ---------------- .../integrations/strawberry/test_strawberry.py | 4 ---- tests/integrations/wsgi/test_wsgi.py | 11 +---------- 14 files changed, 1 insertion(+), 127 deletions(-) diff --git a/tests/integrations/langgraph/test_langgraph.py b/tests/integrations/langgraph/test_langgraph.py index 4e043c1f50..77b81010bb 100644 --- a/tests/integrations/langgraph/test_langgraph.py +++ b/tests/integrations/langgraph/test_langgraph.py @@ -802,7 +802,6 @@ def __init__(self, content, message_type="human"): def test_graph_bubble_up_ignored(sentry_init, capture_items): sentry_init( integrations=[LanggraphIntegration()], - ) events = capture_items("event") diff --git a/tests/integrations/litellm/test_litellm.py b/tests/integrations/litellm/test_litellm.py index 02b4b4dc04..22c36d8a93 100644 --- a/tests/integrations/litellm/test_litellm.py +++ b/tests/integrations/litellm/test_litellm.py @@ -488,7 +488,6 @@ def test_streaming_chat_completion( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [ @@ -558,7 +557,6 @@ async def test_async_streaming_chat_completion( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [ @@ -1033,7 +1031,6 @@ def test_exception_handling( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1069,7 +1066,6 @@ async def test_async_exception_handling( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1106,7 +1102,6 @@ def test_span_origin( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1162,7 +1157,6 @@ def test_multiple_providers( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1264,7 +1258,6 @@ async def test_async_multiple_providers( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1367,7 +1360,6 @@ def test_additional_parameters( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1438,7 +1430,6 @@ async def test_async_additional_parameters( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1509,7 +1500,6 @@ def test_no_integration( sentry_init( disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1567,7 +1557,6 @@ async def test_async_no_integration( sentry_init( disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1624,7 +1613,6 @@ def test_response_without_usage( integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) messages = [{"role": "user", "content": "Hello!"}] @@ -1667,7 +1655,6 @@ def test_integration_setup(sentry_init): integrations=[LiteLLMIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) # Check that callbacks are registered diff --git a/tests/integrations/litestar/test_litestar.py b/tests/integrations/litestar/test_litestar.py index f7a0405bf7..f94faf7606 100644 --- a/tests/integrations/litestar/test_litestar.py +++ b/tests/integrations/litestar/test_litestar.py @@ -108,7 +108,6 @@ def test_catch_exceptions( ): sentry_init( integrations=[LitestarIntegration()], - ) litestar_app = litestar_app_factory() client = TestClient(litestar_app) @@ -155,7 +154,6 @@ def test_segment_name_and_source( sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - ) litestar_app = litestar_app_factory() client = TestClient(litestar_app) @@ -181,7 +179,6 @@ def test_middleware_spans( sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - ) logging_config = LoggingMiddlewareConfig() @@ -238,7 +235,6 @@ async def do_stuff(message): sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - ) litestar_app = litestar_app_factory(middleware=[SampleMiddleware]) @@ -319,7 +315,6 @@ async def __call__(self, scope, receive, send): sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - ) litestar_app = litestar_app_factory(middleware=[SampleReceiveSendMiddleware]) @@ -355,7 +350,6 @@ async def my_send(*args, **kwargs): sentry_init( traces_sample_rate=1.0, integrations=[LitestarIntegration()], - ) litestar_app = litestar_app_factory(middleware=[SamplePartialReceiveSendMiddleware]) @@ -425,7 +419,6 @@ def test_span_origin( sentry_init( integrations=[LitestarIntegration()], traces_sample_rate=1.0, - ) logging_config = LoggingMiddlewareConfig() @@ -644,7 +637,6 @@ def test_configurable_status_codes_handler( ) sentry_init( integrations=[LitestarIntegration(**integration_kwargs)], - ) @get("/error") @@ -678,7 +670,6 @@ def test_configurable_status_codes_middleware( sentry_init( integrations=[LitestarIntegration(**integration_kwargs)], - ) def create_raising_middleware(app): @@ -707,7 +698,6 @@ def test_catch_non_http_exceptions_in_middleware( ): sentry_init( integrations=[LitestarIntegration()], - ) def create_raising_middleware(app): diff --git a/tests/integrations/mcp/test_mcp.py b/tests/integrations/mcp/test_mcp.py index 222acb541a..978272031d 100644 --- a/tests/integrations/mcp/test_mcp.py +++ b/tests/integrations/mcp/test_mcp.py @@ -142,7 +142,6 @@ async def test_tool_handler_constructor_registration(sentry_init, capture_items, sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) async def test_tool(ctx, params): @@ -185,7 +184,6 @@ async def test_mcpserver_high_level_tool_instrumented( sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) mcp_server = MCPServer("test-server") @@ -217,7 +215,6 @@ async def test_wrapping_handler_is_idempotent(sentry_init, capture_items, stdio) sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) async def test_tool(ctx, params): @@ -554,7 +551,6 @@ async def test_tool_handler_stateless_streamable_http( sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -602,7 +598,6 @@ async def test_tool_handler_with_error(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -936,7 +931,6 @@ async def test_prompt_handler_with_error(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -977,7 +971,6 @@ async def test_resource_handler_stdio(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -1034,7 +1027,6 @@ async def test_resource_handler_streamable_http(sentry_init, capture_items, json sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -1097,7 +1089,6 @@ async def test_resource_handler_with_error(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -1338,7 +1329,6 @@ async def test_multiple_handlers(sentry_init, capture_items, stdio): sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -1590,7 +1580,6 @@ async def test_sse_transport_detection_v2(sentry_init, capture_items, json_rpc_s sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") @@ -1668,7 +1657,6 @@ async def test_streamable_http_scope_propagation(sentry_init, capture_items, jso sentry_init( integrations=[MCPIntegration()], traces_sample_rate=1.0, - ) server = Server("test-server") diff --git a/tests/integrations/openai/test_openai.py b/tests/integrations/openai/test_openai.py index 9fdd10f095..41c7260650 100644 --- a/tests/integrations/openai/test_openai.py +++ b/tests/integrations/openai/test_openai.py @@ -1756,7 +1756,6 @@ def test_bad_chat_completion( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("event", "span") @@ -1785,7 +1784,6 @@ def test_span_status_error( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("event", "span") @@ -1816,7 +1814,6 @@ async def test_bad_chat_completion_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = AsyncOpenAI(api_key="z") @@ -2189,7 +2186,6 @@ def test_embeddings_create_raises_error( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -2218,7 +2214,6 @@ async def test_embeddings_create_raises_error_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = AsyncOpenAI(api_key="z") @@ -2246,7 +2241,6 @@ def test_span_origin_nonstreaming_chat( sentry_init( integrations=[OpenAIIntegration()], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -2284,7 +2278,6 @@ async def test_span_origin_nonstreaming_chat_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = AsyncOpenAI(api_key="z") @@ -2320,7 +2313,6 @@ def test_span_origin_streaming_chat( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -2384,7 +2376,6 @@ async def test_span_origin_streaming_chat_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = AsyncOpenAI(api_key="z") @@ -2453,7 +2444,6 @@ def test_span_origin_embeddings( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -2487,7 +2477,6 @@ async def test_span_origin_embeddings_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = AsyncOpenAI(api_key="z") @@ -3178,7 +3167,6 @@ def test_responses_api_conversation_id( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -3220,7 +3208,6 @@ def test_responses_api_reasoning_level( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -4151,7 +4138,6 @@ def test_chat_completion_reasoning_level( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -4270,7 +4256,6 @@ def test_streaming_chat_completion_ttft( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -4351,7 +4336,6 @@ async def test_streaming_chat_completion_ttft_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = AsyncOpenAI(api_key="z") @@ -4433,7 +4417,6 @@ def test_streaming_responses_api_ttft( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = OpenAI(api_key="z") @@ -4485,7 +4468,6 @@ async def test_streaming_responses_api_ttft_async( integrations=[OpenAIIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) client = AsyncOpenAI(api_key="z") diff --git a/tests/integrations/openai_agents/test_openai_agents.py b/tests/integrations/openai_agents/test_openai_agents.py index 496f982686..98519f6bf8 100644 --- a/tests/integrations/openai_agents/test_openai_agents.py +++ b/tests/integrations/openai_agents/test_openai_agents.py @@ -858,7 +858,6 @@ async def test_client_span_custom_model( integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("span") @@ -1854,7 +1853,6 @@ async def test_hosted_mcp_tool_propagation_header_streamed( integrations=[OpenAIAgentsIntegration()], traces_sample_rate=1.0, release="d08ebdb9309e1b004c6f52202de58a09c2268e42", - ) request_headers = {"X-Stainless-Raw-Response": "stream"} @@ -2022,7 +2020,6 @@ async def test_hosted_mcp_tool_propagation_headers( integrations=[OpenAIAgentsIntegration()], traces_sample_rate=1.0, release="d08ebdb9309e1b004c6f52202de58a09c2268e42", - ) response = get_model_response(EXAMPLE_RESPONSE, serialize_pydantic=True) @@ -2179,7 +2176,6 @@ async def test_run_error_handling( ], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("event", "span") @@ -2231,7 +2227,6 @@ async def test_run_streamed_error_handling( ], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("event", "span") @@ -2348,7 +2343,6 @@ async def test_span_status_error( ], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("event", "span") @@ -2687,7 +2681,6 @@ async def test_ai_client_span_response_model_with_chat_completions( integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("span") @@ -3025,7 +3018,6 @@ async def test_streaming_ttft_on_chat_span( sentry_init( integrations=[OpenAIAgentsIntegration()], traces_sample_rate=1.0, - ) request_headers = {"X-Stainless-Raw-Response": "stream"} @@ -3183,7 +3175,6 @@ async def test_conversation_id_on_all_spans( integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("span") @@ -3317,7 +3308,6 @@ def simple_tool(message: str) -> str: integrations=[OpenAIAgentsIntegration()], disabled_integrations=[StdlibIntegration], traces_sample_rate=1.0, - ) items = capture_items("span") diff --git a/tests/integrations/pyramid/test_pyramid.py b/tests/integrations/pyramid/test_pyramid.py index 653638e1ed..8882718b44 100644 --- a/tests/integrations/pyramid/test_pyramid.py +++ b/tests/integrations/pyramid/test_pyramid.py @@ -133,7 +133,6 @@ def test_segment_name_and_source( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - ) items = capture_items("event", "span") @@ -158,7 +157,6 @@ def test_http_route( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - ) items = capture_items("span") @@ -180,7 +178,6 @@ def test_large_json_request( integrations=[PyramidIntegration()], max_request_body_size="always", max_value_length=max_value_length, - ) data = {"foo": {"bar": "a" * (1034)}} @@ -240,7 +237,6 @@ def test_json_not_truncated_if_max_request_body_size_is_always( sentry_init( integrations=[PyramidIntegration()], max_request_body_size="always", - ) data = { @@ -271,7 +267,6 @@ def test_files_and_form( integrations=[PyramidIntegration()], max_request_body_size="always", max_value_length=max_value_length, - ) data = { @@ -411,7 +406,6 @@ def test_error_in_authenticated_userid( PyramidIntegration(), LoggingIntegration(event_level=logging.ERROR), ], - ) logger = logging.getLogger("test_pyramid") @@ -481,7 +475,6 @@ def test_tracing_error( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - ) items = capture_items("event", "span") @@ -521,7 +514,6 @@ def test_span_origin( sentry_init( integrations=[PyramidIntegration()], traces_sample_rate=1.0, - ) items = capture_items("event", "span") diff --git a/tests/integrations/requests/test_requests.py b/tests/integrations/requests/test_requests.py index 9f26fa6d3a..cefde294e3 100644 --- a/tests/integrations/requests/test_requests.py +++ b/tests/integrations/requests/test_requests.py @@ -14,7 +14,6 @@ def test_crumb_capture(sentry_init, capture_events): sentry_init( integrations=[StdlibIntegration()], - ) events = capture_events() @@ -49,7 +48,6 @@ def test_crumb_capture(sentry_init, capture_events): def test_crumb_capture_client_error(sentry_init, capture_events, status_code, level): sentry_init( integrations=[StdlibIntegration()], - ) events = capture_events() @@ -84,7 +82,6 @@ def test_crumb_capture_client_error(sentry_init, capture_events, status_code, le def test_omit_url_data_if_parsing_fails(sentry_init, capture_events): sentry_init( integrations=[StdlibIntegration()], - ) events = capture_events() diff --git a/tests/integrations/rq/test_rq.py b/tests/integrations/rq/test_rq.py index 345928cf76..189a750098 100644 --- a/tests/integrations/rq/test_rq.py +++ b/tests/integrations/rq/test_rq.py @@ -53,7 +53,6 @@ def test_basic( ): sentry_init( integrations=[RqIntegration()], - ) queue = rq.Queue(connection=FakeRedis()) @@ -124,7 +123,6 @@ def test_transport_shutdown( ): sentry_init( integrations=[RqIntegration()], - ) queue = rq.Queue(connection=FakeRedis()) @@ -149,7 +147,6 @@ def test_worker_span_with_error( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - ) queue = rq.Queue(connection=FakeRedis()) @@ -194,7 +191,6 @@ def test_error_has_trace_context_if_tracing_disabled( ): sentry_init( integrations=[RqIntegration()], - ) queue = rq.Queue(connection=FakeRedis()) @@ -216,7 +212,6 @@ def test_tracing_enabled( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - ) queue = rq.Queue(connection=FakeRedis()) @@ -257,7 +252,6 @@ def test_tracing_disabled( ): sentry_init( integrations=[RqIntegration()], - ) queue = rq.Queue(connection=FakeRedis()) @@ -279,7 +273,6 @@ def test_worker_span_no_error( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - ) queue = rq.Queue(connection=FakeRedis()) @@ -309,7 +302,6 @@ def test_traces_sampler_gets_correct_values_in_sampling_context( sentry_init( integrations=[RqIntegration()], traces_sampler=traces_sampler, - ) queue = rq.Queue(connection=FakeRedis()) @@ -345,7 +337,6 @@ def test_job_with_retries( ): sentry_init( integrations=[RqIntegration()], - ) queue = rq.Queue(connection=FakeRedis()) @@ -366,7 +357,6 @@ def test_span_origin( sentry_init( integrations=[RqIntegration()], traces_sample_rate=1.0, - ) queue = rq.Queue(connection=FakeRedis()) diff --git a/tests/integrations/starlette/test_starlette.py b/tests/integrations/starlette/test_starlette.py index 8b48bd6b71..6d017aea10 100644 --- a/tests/integrations/starlette/test_starlette.py +++ b/tests/integrations/starlette/test_starlette.py @@ -291,7 +291,6 @@ async def my_send(*args, **kwargs): async def test_request_info_json_body(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - integrations=[StarletteIntegration()], ) @@ -332,7 +331,6 @@ async def test_request_info_json_body(sentry_init, capture_items): async def test_formdata_request_body(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - max_request_body_size="always", integrations=[StarletteIntegration()], ) @@ -377,7 +375,6 @@ async def test_formdata_request_body(sentry_init, capture_items): async def test_request_body_too_big(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - integrations=[StarletteIntegration()], ) @@ -982,7 +979,6 @@ def test_user_information_does_not_clobber_app_set_user(sentry_init, capture_eve """ sentry_init( traces_sample_rate=1.0, - integrations=[StarletteIntegration()], ) @@ -1590,7 +1586,6 @@ def test_segment_http_method_default(sentry_init, capture_items): def test_request_url(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - integrations=[ StarletteIntegration(), ], @@ -1689,7 +1684,6 @@ async def _error(_): async def test_malformed_json_request_body(sentry_init, capture_events): sentry_init( traces_sample_rate=1.0, - integrations=[StarletteIntegration()], ) diff --git a/tests/integrations/starlite/test_starlite.py b/tests/integrations/starlite/test_starlite.py index b1e97c9130..f3558752e2 100644 --- a/tests/integrations/starlite/test_starlite.py +++ b/tests/integrations/starlite/test_starlite.py @@ -146,7 +146,6 @@ def test_transaction_name_and_source( sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - ) starlite_app = starlite_app_factory() client = TestClient(starlite_app) @@ -169,7 +168,6 @@ def test_middleware_spans(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - ) logging_config = LoggingMiddlewareConfig() @@ -224,7 +222,6 @@ async def do_stuff(message): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - ) starlite_app = starlite_app_factory(middleware=[SampleMiddleware]) @@ -286,7 +283,6 @@ async def __call__(self, scope, receive, send): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - ) starlite_app = starlite_app_factory(middleware=[SampleReceiveSendMiddleware]) @@ -319,7 +315,6 @@ async def my_send(*args, **kwargs): sentry_init( traces_sample_rate=1.0, integrations=[StarliteIntegration()], - ) starlite_app = starlite_app_factory(middleware=[SamplePartialReceiveSendMiddleware]) @@ -370,7 +365,6 @@ def test_span_origin(sentry_init, capture_items): sentry_init( integrations=[StarliteIntegration()], traces_sample_rate=1.0, - ) logging_config = LoggingMiddlewareConfig() diff --git a/tests/integrations/stdlib/test_httplib.py b/tests/integrations/stdlib/test_httplib.py index d4c4695b03..6b93e46309 100644 --- a/tests/integrations/stdlib/test_httplib.py +++ b/tests/integrations/stdlib/test_httplib.py @@ -79,7 +79,6 @@ def create_chunked_server(): def test_crumb_capture(sentry_init, capture_events): sentry_init( integrations=[StdlibIntegration()], - ) events = capture_events() @@ -115,7 +114,6 @@ def test_crumb_capture(sentry_init, capture_events): def test_crumb_capture_client_error(sentry_init, capture_events, status_code, level): sentry_init( integrations=[StdlibIntegration()], - ) events = capture_events() @@ -239,7 +237,6 @@ def test_httplib_misuse(sentry_init, capture_events, request): def test_outgoing_trace_headers(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - ) already_patched_getresponse = HTTPSConnection.getresponse @@ -312,7 +309,6 @@ def test_outgoing_trace_headers_head_sdk(sentry_init, capture_items): sentry_init( traces_sample_rate=0.5, release="foo", - ) already_patched_getresponse = HTTPSConnection.getresponse @@ -374,7 +370,6 @@ def test_outgoing_trace_headers_no_current_span(sentry_init): """ sentry_init( traces_sample_rate=1.0, - ) already_patched_getresponse = HTTPSConnection.getresponse @@ -503,7 +498,6 @@ def test_option_trace_propagation_targets( sentry_init( trace_propagation_targets=trace_propagation_targets, traces_sample_rate=1.0, - ) already_patched_getresponse = HTTPSConnection.getresponse @@ -557,7 +551,6 @@ def test_request_source_disabled(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=False, http_request_source_threshold_ms=0, - ) items = capture_items("span") @@ -590,7 +583,6 @@ def test_request_source_enabled(sentry_init, capture_items, enable_http_request_ sentry_init( traces_sample_rate=1.0, http_request_source_threshold_ms=0, - **kwargs, ) @@ -618,7 +610,6 @@ def test_request_source(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=0, - ) items = capture_items("span") @@ -664,7 +655,6 @@ def test_request_source_with_module_in_search_path(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=0, - ) items = capture_items("span") @@ -703,7 +693,6 @@ def test_no_request_source_if_duration_too_short(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=100, - ) add_http_request_source = sentry_sdk.tracing_utils.add_http_request_source @@ -742,7 +731,6 @@ def test_request_source_if_duration_over_threshold(sentry_init, capture_items): traces_sample_rate=1.0, enable_http_request_source=True, http_request_source_threshold_ms=100, - ) add_http_request_source = sentry_sdk.tracing_utils.add_http_request_source @@ -799,7 +787,6 @@ def add_http_request_source_with_pinned_timestamps(span): def test_span_origin(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - debug=True, ) items = capture_items("span") @@ -823,7 +810,6 @@ def test_http_timeout(monkeypatch, sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - ) items = capture_items("span") @@ -850,7 +836,6 @@ def test_http_timeout(monkeypatch, sentry_init, capture_items): def test_proxy_http_tunnel(sentry_init, capture_items, tunnel_port): sentry_init( traces_sample_rate=1.0, - ) items = capture_items("span") @@ -884,7 +869,6 @@ def test_proxy_http_tunnel(sentry_init, capture_items, tunnel_port): def test_chunked_response_span_covers_body_read(sentry_init, capture_items): sentry_init( traces_sample_rate=1.0, - ) min_expected_duration = CHUNK_DELAY * NUM_CHUNKS diff --git a/tests/integrations/strawberry/test_strawberry.py b/tests/integrations/strawberry/test_strawberry.py index cbd3890904..e36171af87 100644 --- a/tests/integrations/strawberry/test_strawberry.py +++ b/tests/integrations/strawberry/test_strawberry.py @@ -484,7 +484,6 @@ def test_capture_segment_on_error( framework_integrations, ): sentry_init( - integrations=[ StrawberryIntegration(async_execution=async_execution), ] @@ -550,7 +549,6 @@ def test_capture_segment_on_success( ] + framework_integrations, traces_sample_rate=1, - ) items = capture_items("span") @@ -608,7 +606,6 @@ def test_segment_no_operation_name( ] + framework_integrations, traces_sample_rate=1, - ) items = capture_items("span") @@ -665,7 +662,6 @@ def test_segment_mutation( ] + framework_integrations, traces_sample_rate=1, - ) items = capture_items("span") diff --git a/tests/integrations/wsgi/test_wsgi.py b/tests/integrations/wsgi/test_wsgi.py index fce545422d..090c0cc5ba 100644 --- a/tests/integrations/wsgi/test_wsgi.py +++ b/tests/integrations/wsgi/test_wsgi.py @@ -144,7 +144,6 @@ def dogpark(environ, start_response): raise ValueError("Fetch aborted. The ball was not returned.") sentry_init( - traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -244,7 +243,6 @@ def dogpark(environ, start_response): raise ValueError("Fetch aborted. The ball was not returned.") sentry_init( - traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -314,7 +312,6 @@ def dogpark(environ, start_response): raise ValueError("Fetch aborted. The ball was not returned.") sentry_init( - traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -383,7 +380,6 @@ def app(environ, start_response): traces_sampler = mock.Mock(return_value=True) sentry_init( - traces_sampler=traces_sampler, ) app = SentryWsgiMiddleware(app) @@ -426,7 +422,6 @@ def app(environ, start_response): traces_sampler = mock.Mock(return_value=True) sentry_init( - traces_sampler=traces_sampler, ) app = SentryWsgiMiddleware(app) @@ -468,7 +463,6 @@ def sample_app(environ, start_response): traces_sampler = mock.Mock(return_value=True) sentry_init( - traces_sampler=traces_sampler, ) app = SentryWsgiMiddleware(sample_app) @@ -510,7 +504,6 @@ def dogpark(environ, start_response): return ["Go get the ball! Good dog!"] sentry_init( - traces_sample_rate=1.0, ) app = SentryWsgiMiddleware(dogpark) @@ -532,7 +525,6 @@ def dogpark(environ, start_response): return ["Go get the ball! Good dog!"] sentry_init( - traces_sample_rate=1.0, ) app = SentryWsgiMiddleware( @@ -1032,7 +1024,7 @@ def dogpark(environ, start_response): start_response("200 OK", []) return ["woof"] - sentry_init( traces_sample_rate=1.0) + sentry_init(traces_sample_rate=1.0) app = SentryWsgiMiddleware(dogpark) client = Client(app) @@ -1057,7 +1049,6 @@ def dogpark(environ, start_response): return ["woof"] sentry_init( - traces_sample_rate=1.0, ) From 9e952a789536688bf92ea7b9c9c359c62bce5dea Mon Sep 17 00:00:00 2001 From: Pablo Deputter <71842639+pabloDeputter@users.noreply.github.com> Date: Wed, 7 Oct 2026 09:46:04 +0200 Subject: [PATCH 3/4] test(arq, celery, client, gcp, sanic): Drop redundant `data_collection={}` from tests (#7910) Refs PY-2936 --- tests/integrations/arq/test_arq.py | 3 --- .../celery/test_update_celery_task_headers.py | 8 ++++---- tests/integrations/gcp/test_gcp.py | 2 +- tests/integrations/sanic/test_sanic.py | 2 +- tests/test_client.py | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/integrations/arq/test_arq.py b/tests/integrations/arq/test_arq.py index 8f15e48d0f..1cbf5c1a4d 100644 --- a/tests/integrations/arq/test_arq.py +++ b/tests/integrations/arq/test_arq.py @@ -63,7 +63,6 @@ def inner( sentry_init_kwargs = { "integrations": [ArqIntegration()], "traces_sample_rate": 1.0, - "data_collection": {}, } sentry_init_kwargs.update(init_kwargs or {}) sentry_init(**sentry_init_kwargs) @@ -111,7 +110,6 @@ def inner( sentry_init_kwargs = { "integrations": [ArqIntegration()], "traces_sample_rate": 1.0, - "data_collection": {}, } sentry_init_kwargs.update(init_kwargs or {}) sentry_init(**sentry_init_kwargs) @@ -162,7 +160,6 @@ def inner( sentry_init_kwargs = { "integrations": [ArqIntegration()], "traces_sample_rate": 1.0, - "data_collection": {}, } sentry_init_kwargs.update(init_kwargs or {}) sentry_init(**sentry_init_kwargs) diff --git a/tests/integrations/celery/test_update_celery_task_headers.py b/tests/integrations/celery/test_update_celery_task_headers.py index 97d3f6def5..39268b45d0 100644 --- a/tests/integrations/celery/test_update_celery_task_headers.py +++ b/tests/integrations/celery/test_update_celery_task_headers.py @@ -70,7 +70,7 @@ def test_monitor_beat_tasks_with_headers(monitor_beat_tasks): def test_span_with_segment(sentry_init): - sentry_init(traces_sample_rate=1.0, data_collection={}) + sentry_init(traces_sample_rate=1.0) headers = {} monitor_beat_tasks = False @@ -90,7 +90,7 @@ def test_span_with_segment(sentry_init): def test_span_with_segment_custom_headers(sentry_init): - sentry_init(traces_sample_rate=1.0, data_collection={}) + sentry_init(traces_sample_rate=1.0) headers = { "baggage": BAGGAGE_VALUE, "sentry-trace": SENTRY_TRACE_VALUE, @@ -133,7 +133,7 @@ def test_celery_trace_propagation_default(sentry_init, monitor_beat_tasks): The Celery integration has its own mechanism to propagate traces: https://docs.sentry.io/platforms/python/integrations/celery/#distributed-traces """ - sentry_init(data_collection={}) + sentry_init() headers = {} span = None @@ -169,7 +169,7 @@ def test_celery_trace_propagation_traces_sample_rate( The Celery integration has its own mechanism to propagate traces: https://docs.sentry.io/platforms/python/integrations/celery/#distributed-traces """ - sentry_init(traces_sample_rate=traces_sample_rate, data_collection={}) + sentry_init(traces_sample_rate=traces_sample_rate) headers = {} span = None diff --git a/tests/integrations/gcp/test_gcp.py b/tests/integrations/gcp/test_gcp.py index 6910254895..2593a17e2a 100644 --- a/tests/integrations/gcp/test_gcp.py +++ b/tests/integrations/gcp/test_gcp.py @@ -613,7 +613,7 @@ def cloud_function(functionhandler, event): + FUNCTIONS_PRELUDE + dedent( """ - init_sdk(traces_sample_rate=1.0, data_collection={}) + init_sdk(traces_sample_rate=1.0) gcp_functions.worker_v1.FunctionHandler.invoke_user_function(functionhandler, event) """ ) diff --git a/tests/integrations/sanic/test_sanic.py b/tests/integrations/sanic/test_sanic.py index b54c9faefc..6866c3f70d 100644 --- a/tests/integrations/sanic/test_sanic.py +++ b/tests/integrations/sanic/test_sanic.py @@ -104,7 +104,7 @@ def reusable_client(app): def test_request_data(sentry_init, app, capture_events): - sentry_init(integrations=[SanicIntegration()], data_collection={}) + sentry_init(integrations=[SanicIntegration()]) events = capture_events() c = get_client(app) diff --git a/tests/test_client.py b/tests/test_client.py index a6505b4f9b..df56714fa8 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -953,7 +953,7 @@ def test_dict_changed_during_iteration(sentry_init, capture_events): See https://github.com/getsentry/sentry-python/pull/298 for discussion """ - sentry_init(data_collection={}) + sentry_init() events = capture_events() class TooSmartClass: From 91035b4a4725d51f97060527bdca1d4a142d46da Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Wed, 7 Oct 2026 07:12:46 -0400 Subject: [PATCH 4/4] missed some --- tests/integrations/pyramid/test_pyramid.py | 16 ++++++++-------- tests/integrations/starlite/test_starlite.py | 2 +- tests/integrations/stdlib/test_httplib.py | 2 +- tests/integrations/wsgi/test_wsgi.py | 16 ++++++++-------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/integrations/pyramid/test_pyramid.py b/tests/integrations/pyramid/test_pyramid.py index 8882718b44..86113ff2de 100644 --- a/tests/integrations/pyramid/test_pyramid.py +++ b/tests/integrations/pyramid/test_pyramid.py @@ -65,7 +65,7 @@ def inner(): def test_view_exceptions( get_client, route, sentry_init, capture_events, capture_exceptions ): - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) events = capture_events() exceptions = capture_exceptions() @@ -93,7 +93,7 @@ def errors(request): def test_has_context(route, get_client, sentry_init, capture_events): - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) events = capture_events() @route("/context_message/{msg}") @@ -211,7 +211,7 @@ def index(request): @pytest.mark.parametrize("data", [{}, []], ids=["empty-dict", "empty-list"]) def test_flask_empty_json_request(sentry_init, capture_events, route, get_client, data): - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) @route("/") def index(request): @@ -305,7 +305,7 @@ def test_bad_request_not_captured( ): import pyramid.httpexceptions as exc - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) events = capture_events() @route("/") @@ -326,7 +326,7 @@ def errorhandler(exc, request): def test_errorhandler_ok( sentry_init, pyramid_config, capture_exceptions, route, get_client ): - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) errors = capture_exceptions() @route("/") @@ -347,7 +347,7 @@ def errorhandler(exc, request): def test_errorhandler_500( sentry_init, pyramid_config, capture_exceptions, route, get_client ): - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) errors = capture_exceptions() @route("/") @@ -372,7 +372,7 @@ def errorhandler(exc, request): def test_error_in_errorhandler( sentry_init, pyramid_config, capture_events, route, get_client ): - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) @route("/") def index(request): @@ -448,7 +448,7 @@ def tween(request): def test_tween_ok(sentry_init, pyramid_config, capture_exceptions, route, get_client): - sentry_init(integrations=[PyramidIntegration()], data_collection={}) + sentry_init(integrations=[PyramidIntegration()]) errors = capture_exceptions() @route("/") diff --git a/tests/integrations/starlite/test_starlite.py b/tests/integrations/starlite/test_starlite.py index f3558752e2..ed02a2c340 100644 --- a/tests/integrations/starlite/test_starlite.py +++ b/tests/integrations/starlite/test_starlite.py @@ -100,7 +100,7 @@ def test_catch_exceptions( expected_message, expected_tx_name, ): - sentry_init(integrations=[StarliteIntegration()], data_collection={}) + sentry_init(integrations=[StarliteIntegration()]) starlite_app = starlite_app_factory() exceptions = capture_exceptions() events = capture_events() diff --git a/tests/integrations/stdlib/test_httplib.py b/tests/integrations/stdlib/test_httplib.py index 6b93e46309..5fbbbb700f 100644 --- a/tests/integrations/stdlib/test_httplib.py +++ b/tests/integrations/stdlib/test_httplib.py @@ -198,7 +198,7 @@ def test_httplib_misuse(sentry_init, capture_events, request): wrongly. """ - sentry_init(data_collection={}) + sentry_init() events = capture_events() conn = HTTPConnection("localhost", PORT) diff --git a/tests/integrations/wsgi/test_wsgi.py b/tests/integrations/wsgi/test_wsgi.py index 090c0cc5ba..6ed3abbfe9 100644 --- a/tests/integrations/wsgi/test_wsgi.py +++ b/tests/integrations/wsgi/test_wsgi.py @@ -45,7 +45,7 @@ def next(self): def test_basic(sentry_init, crashing_app, capture_events): - sentry_init(data_collection={}) + sentry_init() app = SentryWsgiMiddleware(crashing_app) client = Client(app) events = capture_events() @@ -69,7 +69,7 @@ def test_basic(sentry_init, crashing_app, capture_events): def test_script_name_is_respected( sentry_init, crashing_app, capture_events, script_name, path_info ): - sentry_init(data_collection={}) + sentry_init() app = SentryWsgiMiddleware(crashing_app) client = Client(app) events = capture_events() @@ -85,7 +85,7 @@ def test_script_name_is_respected( @pytest.mark.parametrize("zero_code", [0, None]) def test_systemexit_zero_is_ignored(sentry_init, capture_events, zero_code): - sentry_init(data_collection={}) + sentry_init() iterable = ExitingIterable(lambda: SystemExit(zero_code)) app = SentryWsgiMiddleware(IterableApp(iterable)) client = Client(app) @@ -99,7 +99,7 @@ def test_systemexit_zero_is_ignored(sentry_init, capture_events, zero_code): @pytest.mark.parametrize("nonzero_code", ["", "foo", 1, 2]) def test_systemexit_nonzero_is_captured(sentry_init, capture_events, nonzero_code): - sentry_init(data_collection={}) + sentry_init() iterable = ExitingIterable(lambda: SystemExit(nonzero_code)) app = SentryWsgiMiddleware(IterableApp(iterable)) client = Client(app) @@ -118,7 +118,7 @@ def test_systemexit_nonzero_is_captured(sentry_init, capture_events, nonzero_cod def test_keyboard_interrupt_is_captured(sentry_init, capture_events): - sentry_init(data_collection={}) + sentry_init() iterable = ExitingIterable(lambda: KeyboardInterrupt()) app = SentryWsgiMiddleware(IterableApp(iterable)) client = Client(app) @@ -286,7 +286,7 @@ def dogpark(environ, start_response): capture_message("Attempting to fetch the ball") raise ValueError("Fetch aborted. The ball was not returned.") - sentry_init(data_collection={}) + sentry_init() app = SentryWsgiMiddleware(dogpark) client = Client(app) events = capture_events() @@ -345,7 +345,7 @@ def dogpark(environ, start_response): capture_message("Attempting to fetch the ball") raise ValueError("Fetch aborted. The ball was not returned.") - sentry_init(data_collection={}) + sentry_init() app = SentryWsgiMiddleware(dogpark) client = Client(app) events = capture_events() @@ -555,7 +555,7 @@ def dogpark(environ, start_response): def test_file_response_wrapping( sentry_init, has_file_wrapper, has_fileno, expect_wrapped ): - sentry_init(data_collection={}) + sentry_init() response_mock = mock.MagicMock() if not has_fileno: