feat(telemetry): add bounded native pipeline lifecycle

This commit is contained in:
DCCONSTRUCTIONS
2026-07-29 12:32:52 +03:00
parent d8ccc9345a
commit 636db089ae
13 changed files with 830 additions and 13 deletions
+7
View File
@@ -75,6 +75,7 @@ PROMETHEUS_SAMPLE = re.compile(
r"(?:\{[^}]*\})?\s+(?P<value>[0-9.eE+-]+)$"
)
TELEMETRY_QUERY_SCHEMA: Final = "missioncore.telemetry-query/v1"
PIPELINE_TELEMETRY_SCHEMA: Final = "missioncore.agent-pipeline-telemetry/v1"
DEFAULT_TELEMETRY_QUERY_URL: Final = "http://127.0.0.1:18030"
RootProvider = Callable[[], Path]
@@ -510,6 +511,12 @@ def _agent_raw_document(document: dict[str, Any]) -> dict[str, Any]:
if model_load_seconds is not None:
perception["model_load_seconds"] = model_load_seconds
perception["collector_state"] = fields.get("collector_state")
elif sample.get("source_schema") == PIPELINE_TELEMETRY_SCHEMA:
# Native lifecycle rows are immutable run evidence. The current
# service snapshot remains owned by the periodic health sample,
# so a terminal event cannot make a healthy worker look idle,
# failed, or busy after the fact.
continue
else:
pipeline_payload = _mapping(payload.get("payload")) or payload
for name, value in pipeline_payload.items():