55
66
77def test_conversation_id_propagates_to_span_with_gen_ai_operation_name (
8- self , sentry_init , capture_events
8+ sentry_init , capture_events
99):
1010 """Span with gen_ai.operation.name data should get conversation_id."""
1111 sentry_init (traces_sample_rate = 1.0 )
@@ -23,9 +23,7 @@ def test_conversation_id_propagates_to_span_with_gen_ai_operation_name(
2323 assert span_data .get ("gen_ai.conversation.id" ) == "conv-op-name-test"
2424
2525
26- def test_conversation_id_propagates_to_span_with_ai_op (
27- self , sentry_init , capture_events
28- ):
26+ def test_conversation_id_propagates_to_span_with_ai_op (sentry_init , capture_events ):
2927 """Span with ai.* op should get conversation_id."""
3028 sentry_init (traces_sample_rate = 1.0 )
3129 events = capture_events ()
@@ -44,7 +42,7 @@ def test_conversation_id_propagates_to_span_with_ai_op(
4442
4543@pytest .mark .parametrize ("stream_gen_ai_spans" , [True , False ])
4644def test_conversation_id_propagates_to_span_with_gen_ai_op (
47- self , sentry_init , capture_events , capture_items , stream_gen_ai_spans
45+ sentry_init , capture_events , capture_items , stream_gen_ai_spans
4846):
4947 """Span with gen_ai.* op should get conversation_id."""
5048 sentry_init (
@@ -80,9 +78,7 @@ def test_conversation_id_propagates_to_span_with_gen_ai_op(
8078 assert span_data .get ("gen_ai.conversation.id" ) == "conv-gen-ai-op-test"
8179
8280
83- def test_conversation_id_not_propagated_to_non_ai_span (
84- self , sentry_init , capture_events
85- ):
81+ def test_conversation_id_not_propagated_to_non_ai_span (sentry_init , capture_events ):
8682 """Non-AI span should NOT get conversation_id."""
8783 sentry_init (traces_sample_rate = 1.0 )
8884 events = capture_events ()
@@ -99,7 +95,7 @@ def test_conversation_id_not_propagated_to_non_ai_span(
9995 assert "gen_ai.conversation.id" not in span_data
10096
10197
102- def test_conversation_id_not_propagated_when_not_set (self , sentry_init , capture_events ):
98+ def test_conversation_id_not_propagated_when_not_set (sentry_init , capture_events ):
10399 """AI span should not have conversation_id if not set on scope."""
104100 sentry_init (traces_sample_rate = 1.0 )
105101 events = capture_events ()
@@ -117,9 +113,7 @@ def test_conversation_id_not_propagated_when_not_set(self, sentry_init, capture_
117113 assert "gen_ai.conversation.id" not in span_data
118114
119115
120- def test_conversation_id_not_propagated_to_span_without_op (
121- self , sentry_init , capture_events
122- ):
116+ def test_conversation_id_not_propagated_to_span_without_op (sentry_init , capture_events ):
123117 """Span without op and without gen_ai.operation.name should NOT get conversation_id."""
124118 sentry_init (traces_sample_rate = 1.0 )
125119 events = capture_events ()
@@ -137,7 +131,7 @@ def test_conversation_id_not_propagated_to_span_without_op(
137131
138132
139133def test_conversation_id_propagates_with_gen_ai_operation_name_no_op (
140- self , sentry_init , capture_events
134+ sentry_init , capture_events
141135):
142136 """Span with gen_ai.operation.name but no op should still get conversation_id."""
143137 sentry_init (traces_sample_rate = 1.0 )
@@ -156,7 +150,7 @@ def test_conversation_id_propagates_with_gen_ai_operation_name_no_op(
156150
157151
158152def test_conversation_id_propagates_to_transaction_with_ai_op (
159- self , sentry_init , capture_events
153+ sentry_init , capture_events
160154):
161155 """Transaction with ai.* op should get conversation_id."""
162156 sentry_init (traces_sample_rate = 1.0 )
@@ -174,7 +168,7 @@ def test_conversation_id_propagates_to_transaction_with_ai_op(
174168
175169
176170def test_conversation_id_not_propagated_to_non_ai_transaction (
177- self , sentry_init , capture_events
171+ sentry_init , capture_events
178172):
179173 """Non-AI transaction should NOT get conversation_id."""
180174 sentry_init (traces_sample_rate = 1.0 )
0 commit comments