Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| from typing import Literal | |
| PipelineStatus = Literal["ok", "error", "ambiguous"] | |
| RepairOutcome = Literal["attempt", "success", "failed", "skipped"] | |
| class Metrics(ABC): | |
| def observe_stage_duration_ms(self, *, stage: str, dt_ms: float) -> None: ... | |
| def inc_pipeline_run(self, *, status: PipelineStatus) -> None: ... | |
| def inc_stage_call(self, *, stage: str, ok: bool) -> None: ... | |
| def inc_stage_error(self, *, stage: str, error_code: str) -> None: ... | |
| def inc_repair_trigger(self, *, stage: str, reason: str) -> None: ... | |
| def inc_repair_attempt(self, *, stage: str, outcome: RepairOutcome) -> None: ... | |