add sandbox observability contracts

This commit is contained in:
Azamat 2026-04-03 00:37:35 +03:00
parent e9ef178b15
commit a86e1ee8c7
6 changed files with 131 additions and 0 deletions

View file

@ -24,6 +24,8 @@ class SandboxSessionRepository(Protocol):
def list_expired(self, now: datetime) -> list[SandboxSession]: ...
def count_active(self) -> int: ...
def save(self, session: SandboxSession) -> None: ...
def delete(self, session_id: UUID) -> None: ...
@ -86,6 +88,13 @@ class Metrics(Protocol):
attrs: Attrs | None = None,
) -> None: ...
def set(
self,
name: str,
value: int | float,
attrs: Attrs | None = None,
) -> None: ...
class Span(Protocol):
def set_attribute(self, name: str, value: AttrValue) -> None: ...