Transport‑Neutral Observability Model (application/observability.py)

opensquilla · src/opensquilla/application/observability.py · python · Apache-2.0
dev-tools, infra, tag:readiness, tag:runtime

Defines queries, results, and protocols for log tailing and readiness diagnostics, enabling runtime health monitoring independent of transport layers.

# Source: https://github.com/TokenRhythm/opensquilla | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Transport-neutral runtime observability and readiness use cases."""

from __future__ import annotations

from collections.abc import Awaitable, Callable, Mapping, Sequence
from dataclasses import dataclass, replace
from typing import Literal, NotRequired, Protocol, TypedDict


@dataclass(frozen=True, slots=True)
class LogTailQuery:
    cursor: int = 0
    limit: int = 100
    level: str | None = None


@dataclass(frozen=True, slots=True)
class ReadinessQuery:
    agent_id: str = "main"
    deep: bool = True
    probe_providers: bool = False


type ReadinessSeverity = Literal["err

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key