mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 16:01:14 +00:00
feat(02-07): add Pydantic v2 boundary-log schemas (OBS-01)
- Create src/gps_denied/obs/log_schemas.py with 3 models: MavlinkGpsInputEmitted (AC-4.3 + AC-1.4), ApiRequestCompleted, AnchorDecision (VERIFY-02) - All models use ConfigDict(extra='forbid', frozen=True) - SourceLabel Literal encodes AC-1.4 vocab; AnchorRejectReason encodes VERIFY-02 - Update gps_denied.obs barrel __init__.py to re-export all schemas + type aliases
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""Observability package — structlog spine + boundary log schemas.
|
||||
|
||||
Hot-path logging spine wired by ``configure_logging``; per-frame ``correlation_id``
|
||||
(= frame_id) bound at ``pipeline/orchestrator.py:process_frame``.
|
||||
|
||||
Boundary log schemas (REST, FDR, anchor decisions) defined in ``log_schemas``.
|
||||
"""
|
||||
import structlog
|
||||
|
||||
from gps_denied.obs.log_schemas import (
|
||||
AnchorDecision,
|
||||
AnchorRejectReason,
|
||||
ApiRequestCompleted,
|
||||
MavlinkGpsInputEmitted,
|
||||
SourceLabel,
|
||||
)
|
||||
from gps_denied.obs.logging_config import configure_logging
|
||||
|
||||
get_logger = structlog.get_logger # convenience re-export
|
||||
|
||||
__all__ = [
|
||||
"configure_logging",
|
||||
"get_logger",
|
||||
# Boundary schemas
|
||||
"MavlinkGpsInputEmitted",
|
||||
"ApiRequestCompleted",
|
||||
"AnchorDecision",
|
||||
"SourceLabel",
|
||||
"AnchorRejectReason",
|
||||
]
|
||||
Reference in New Issue
Block a user