@@ -39,14 +39,11 @@ def test_span_origin_custom(sentry_init, capture_events):
3939 assert second_transaction ["spans" ][0 ]["origin" ] == "baz.baz2.baz3"
4040
4141
42- @pytest .mark .parametrize ("disabled_origins" , [None , [], "noop" ])
43- def test_disabled_span_origins_empty_config (
44- sentry_init , capture_events , disabled_origins
45- ):
46- """Test that when disabled_span_origins is None or empty, all spans are allowed."""
47- if disabled_origins in (None , []):
48- sentry_init (traces_sample_rate = 1.0 , disabled_span_origins = disabled_origins )
49- elif disabled_origins == "noop" :
42+ @pytest .mark .parametrize ("excluded_origins" , [None , [], "noop" ])
43+ def test_exclude_span_origins_empty (sentry_init , capture_events , excluded_origins ):
44+ if excluded_origins in (None , []):
45+ sentry_init (traces_sample_rate = 1.0 , exclude_span_origins = excluded_origins )
46+ elif excluded_origins == "noop" :
5047 sentry_init (
5148 traces_sample_rate = 1.0 ,
5249 # default is None
@@ -65,7 +62,7 @@ def test_disabled_span_origins_empty_config(
6562
6663
6764@pytest .mark .parametrize (
68- "disabled_origins ,origins,expected_events_count,expected_allowed_origins" ,
65+ "excluded_origins ,origins,expected_events_count,expected_allowed_origins" ,
6966 [
7067 # Regexes
7168 (
@@ -105,18 +102,17 @@ def test_disabled_span_origins_empty_config(
105102 ),
106103 ],
107104)
108- def test_disabled_span_origins_filtering (
105+ def test_exclude_span_origins_patterns (
109106 sentry_init ,
110107 capture_events ,
111- disabled_origins ,
108+ excluded_origins ,
112109 origins ,
113110 expected_events_count ,
114111 expected_allowed_origins ,
115112):
116- """Test disabled_span_origins with various pattern configurations."""
117113 sentry_init (
118114 traces_sample_rate = 1.0 ,
119- disabled_span_origins = disabled_origins ,
115+ exclude_span_origins = excluded_origins ,
120116 )
121117
122118 events = capture_events ()
@@ -134,8 +130,8 @@ def test_disabled_span_origins_filtering(
134130 assert captured_origins == set (expected_allowed_origins )
135131
136132
137- def test_disabled_span_origins_with_child_spans (sentry_init , capture_events ):
138- sentry_init (traces_sample_rate = 1.0 , disabled_span_origins = [r"auto\.http\..*" ])
133+ def test_exclude_span_origins_with_child_spans (sentry_init , capture_events ):
134+ sentry_init (traces_sample_rate = 1.0 , exclude_span_origins = [r"auto\.http\..*" ])
139135 events = capture_events ()
140136
141137 with start_span (name = "parent" , origin = "manual" ):
@@ -150,8 +146,8 @@ def test_disabled_span_origins_with_child_spans(sentry_init, capture_events):
150146 assert events [0 ]["spans" ][0 ]["origin" ] == "auto.db.postgres"
151147
152148
153- def test_disabled_span_origin_parent_with_child_spans (sentry_init , capture_events ):
154- sentry_init (traces_sample_rate = 1.0 , disabled_span_origins = [r"auto\.http\..*" ])
149+ def test_exclude_span_origins_parent_with_child_spans (sentry_init , capture_events ):
150+ sentry_init (traces_sample_rate = 1.0 , exclude_span_origins = [r"auto\.http\..*" ])
155151 events = capture_events ()
156152
157153 with start_span (name = "parent" , origin = "auto.http.requests" ):
0 commit comments