Telemetry specific context tied to the lifetime of the span.
| 36 | |
| 37 | @dataclass(frozen=True) |
| 38 | class TelemetryContext: |
| 39 | """Telemetry specific context tied to the lifetime of the span.""" |
| 40 | |
| 41 | otel_context: context_api.Context |
| 42 | """OTel context holding the current trace span.""" |
| 43 | |
| 44 | _associated_event_ids: list[str] = field(default_factory=list) |
| 45 | """Event IDs added to the event queue within a given node.""" |
| 46 | |
| 47 | def add_event(self, event: Event) -> None: |
| 48 | """Adds an event ID to the associated events list.""" |
| 49 | self._associated_event_ids.append(event.id) |
| 50 | |
| 51 | |
| 52 | @dataclass |
no outgoing calls
no test coverage detected