@@ -288,7 +288,7 @@ def test_disabled_tracing():
288
288
289
289
290
290
def enabled_trace_disabled_span ():
291
- with trace (workflow_name = "test" , trace_id = "123 " ):
291
+ with trace (workflow_name = "test" , trace_id = "trace_123 " ):
292
292
with agent_span (name = "agent_1" ):
293
293
with function_span (name = "function_1" , disabled = True ):
294
294
with generation_span ():
@@ -298,17 +298,19 @@ def enabled_trace_disabled_span():
298
298
def test_enabled_trace_disabled_span ():
299
299
enabled_trace_disabled_span ()
300
300
301
- spans , traces = fetch_ordered_spans (), fetch_traces ()
302
- assert len (spans ) == 1 # Only the agent span is recorded
303
- assert len (traces ) == 1 # The trace is recorded
304
-
305
- trace = traces [0 ]
306
- standard_trace_checks (trace , name_check = "test" )
307
- trace_id = trace .trace_id
308
-
309
- first_span = spans [0 ]
310
- standard_span_checks (first_span , trace_id = trace_id , parent_id = None , span_type = "agent" )
311
- assert first_span .span_data .name == "agent_1"
301
+ assert fetch_normalized_spans () == snapshot (
302
+ [
303
+ {
304
+ "workflow_name" : "test" ,
305
+ "children" : [
306
+ {
307
+ "type" : "agent" ,
308
+ "data" : {"name" : "agent_1" },
309
+ }
310
+ ],
311
+ }
312
+ ]
313
+ )
312
314
313
315
314
316
def test_start_and_end_called_manual ():
0 commit comments