(rollout_id: str, attempt_id: str, *, sequence_id: int, index: int)
| 46 | |
| 47 | |
| 48 | def _build_span(rollout_id: str, attempt_id: str, *, sequence_id: int, index: int) -> Span: |
| 49 | trace_hex = f"{index:032x}" |
| 50 | span_hex = f"{index:016x}" |
| 51 | # Minimal span that passes validation and keeps log output predictable. |
| 52 | return Span( |
| 53 | rollout_id=rollout_id, |
| 54 | attempt_id=attempt_id, |
| 55 | sequence_id=sequence_id, |
| 56 | trace_id=trace_hex, |
| 57 | span_id=span_hex, |
| 58 | parent_id=None, |
| 59 | name="test-span", |
| 60 | status=TraceStatus(status_code="OK"), |
| 61 | attributes={"stage": "collect"}, |
| 62 | events=[], |
| 63 | links=[], |
| 64 | start_time=None, |
| 65 | end_time=None, |
| 66 | context=SpanContext(trace_id=trace_hex, span_id=span_hex, is_remote=False, trace_state={}), |
| 67 | parent=None, |
| 68 | resource=OtelResource(attributes={}, schema_url=""), |
| 69 | ) |
| 70 | |
| 71 | |
| 72 | async def _mock_runner( |
no test coverage detected