From 6de6e36dbe599ee942aeecedc439de228c050aef Mon Sep 17 00:00:00 2001 From: Victor Kyriazakos Date: Fri, 24 Jul 2026 21:58:46 +0000 Subject: [PATCH] fix(monitoring): surface cron snapshot failures at WARNING (content-free) The cron health snapshot failure path logged only at DEBUG, so a cron telemetry regression would silently drop all hermes.cron.* metrics while gateway health metrics kept flowing. Promote to WARNING with the exception *type* name only (no message text, preserving the no-raw-error contract); keep the traceback on DEBUG. (cherry picked from commit 1c9a3e737b7c57fa9886bc927f1623753a9a811b) --- agent/monitoring/gateway_health_export.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/agent/monitoring/gateway_health_export.py b/agent/monitoring/gateway_health_export.py index 222ac599523..ce9c2e4e7d6 100644 --- a/agent/monitoring/gateway_health_export.py +++ b/agent/monitoring/gateway_health_export.py @@ -305,8 +305,16 @@ def _read_runtime_snapshot(config: Dict[str, Any]): gateway_snapshot = _read_gateway_snapshot(config) try: cron_snapshot = _read_cron_snapshot() - except Exception: - logger.debug("cron health snapshot unavailable", exc_info=True) + except Exception as exc: + # Content-free visibility: cron telemetry silently dropping out is a + # release-relevant regression, so surface it at WARNING with only the + # exception *type* name (never the message, which could carry paths or + # other environment detail). exc_info stays on the DEBUG record. + logger.warning( + "cron health snapshot unavailable; cron telemetry not exported (error_type=%s)", + type(exc).__name__, + ) + logger.debug("cron health snapshot traceback", exc_info=True) return gateway_snapshot gateway_snapshot.metrics.extend(cron_snapshot.metrics) return gateway_snapshot