feat(telemetry): expose compute pipeline stage metrics

This commit is contained in:
DCCONSTRUCTIONS
2026-07-29 01:53:31 +03:00
parent 783aa444ac
commit 79eb4b46f7
19 changed files with 1000 additions and 24 deletions
@@ -151,7 +151,7 @@ def _normalize(topic: str, payload: bytes) -> tuple[object, ...]:
observed_value = document.get("observed_at_utc")
measurement = kind
elif (
kind == "host"
kind in {"host", "pipeline"}
and isinstance(document.get("name"), str)
and isinstance(document.get("fields"), dict)
):
@@ -160,6 +160,8 @@ def _normalize(topic: str, payload: bytes) -> tuple[object, ...]:
measurement = document["name"].strip()
if not measurement or len(measurement) > 128:
raise ValueError("Telegraf measurement name is required")
if kind == "pipeline" and measurement != "missioncore_pipeline":
raise ValueError("Telegraf pipeline measurement is not recognized")
else:
raise ValueError("payload schema does not match topic kind")
node_id = document.get("node_id") or _tag_text(document, "node_id")