(rollout_id: str, attempt_id: str, sequence_id: int, name: str, attribute_size: int)
| 44 | |
| 45 | |
| 46 | def _make_span(rollout_id: str, attempt_id: str, sequence_id: int, name: str, attribute_size: int) -> Span: |
| 47 | trace_hex = f"{sequence_id:032x}" |
| 48 | span_hex = f"{sequence_id:016x}" |
| 49 | return Span( |
| 50 | rollout_id=rollout_id, |
| 51 | attempt_id=attempt_id, |
| 52 | sequence_id=sequence_id, |
| 53 | trace_id=trace_hex, |
| 54 | span_id=span_hex, |
| 55 | parent_id=None, |
| 56 | name=name, |
| 57 | status=TraceStatus(status_code="OK"), |
| 58 | attributes=flatten_dict( |
| 59 | random_dict( |
| 60 | depth=1, |
| 61 | breadth=attribute_size, |
| 62 | key_length=(3, 20), |
| 63 | value_length=(5, 300), |
| 64 | ) |
| 65 | ), |
| 66 | events=[], |
| 67 | links=[], |
| 68 | start_time=None, |
| 69 | end_time=None, |
| 70 | context=SpanContext(trace_id=trace_hex, span_id=span_hex, is_remote=False, trace_state={}), |
| 71 | parent=None, |
| 72 | resource=OtelResource(attributes={}, schema_url=""), |
| 73 | ) |
| 74 | |
| 75 | |
| 76 | @dataclass |
no test coverage detected