Add debug logging for interval values in monitor creation
All checks were successful
Build and Push Container / build (push) Successful in 34s

This helps trace the interval values at each step:
- Claude agent logs what interval it suggested
- Monitor service logs the interval when creating and deploying

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-01-05 20:26:10 +00:00
parent 7ecb6e396e
commit a65997a391
2 changed files with 21 additions and 0 deletions

View File

@@ -167,6 +167,12 @@ class MonitorService:
"""
kuma = get_kuma_client()
interval_minutes = max(1, suggestion.interval // 60)
logger.info(
f"Creating monitor '{suggestion.name}': type={suggestion.type}, "
f"interval={suggestion.interval}s ({interval_minutes}min)"
)
# Build monitor from suggestion
monitor = Monitor(
type=suggestion.type,
@@ -259,6 +265,11 @@ class MonitorService:
Returns:
Dict with status and any error messages
"""
logger.info(
f"Deploying push script: metric={push_metric}, monitor_id={monitor_id}, "
f"interval_minutes={interval_minutes}"
)
kuma = get_kuma_client()
ssh = get_ssh_manager()