MCPcopy
hub / github.com/microsoft/agent-lightning / make_span

Function make_span

tests/store/test_threading.py:94–112  ·  view source on GitHub ↗
(rollout_id: str, attempt_id: str, sequence_id: int = 1)

Source from the content-addressed store, hash-verified

92
93
94def make_span(rollout_id: str, attempt_id: str, sequence_id: int = 1) -> Span:
95 return Span(
96 rollout_id=rollout_id,
97 attempt_id=attempt_id,
98 sequence_id=sequence_id,
99 trace_id="0" * 32,
100 span_id="0" * 16,
101 parent_id=None,
102 name="test-span",
103 status=TraceStatus(status_code="OK"),
104 attributes={},
105 events=[],
106 links=[],
107 start_time=None,
108 end_time=None,
109 context=SpanContext(trace_id="0" * 32, span_id="0" * 16, is_remote=False, trace_state={}),
110 parent=None,
111 resource=OtelResource(attributes={}, schema_url=""),
112 )
113
114
115@pytest.mark.asyncio

Calls 4

SpanClass · 0.90
TraceStatusClass · 0.90
SpanContextClass · 0.90
OtelResourceClass · 0.90

Tested by

no test coverage detected