Monitoring Tools

June 18, 2026 ยท View on GitHub

Tools for production monitoring and health checks.

Tools Overview

ToolPurposeApproval Required
memory_statsMemory usageNo
gc_statsGC statisticsNo
runtime_statsRuntime statisticsNo
health_checkOverall healthNo
metrics_exportPrometheus metricsNo
thread_dump_allAll thread stacksNo
gc_tuneTune GC parametersYes (:modify-running-code)

memory_stats

Overview

Get memory usage statistics.

Tool Definition

{
  "name": "memory_stats",
  "description": "Get memory usage statistics"
}

Return Value

{
  "total_bytes": 2147483648,
  "by_generation": [
    {"generation": 0, "bytes": 67108864},
    {"generation": 1, "bytes": 268435456},
    {"generation": 2, "bytes": 1073741824}
  ],
  "bytes_freed": 536870912
}

health_check

Overview

Check overall system health.

Tool Definition

{
  "name": "health_check",
  "description": "Basic health check"
}

Return Value

{
  "status": "healthy",
  "checks": {
    "memory": "ok",
    "threads": "ok",
    "gc": "ok"
  },
  "uptime_seconds": 3600,
  "timestamp": "2026-02-11T10:00:00Z"
}

metrics_export

Overview

Export metrics in Prometheus format.

Tool Definition

{
  "name": "metrics_export",
  "description": "Export metrics for Prometheus"
}

Return Value

# HELP cltron_heap_bytes_allocated Total heap bytes allocated
# TYPE cltron_heap_bytes_allocated gauge
cltron_heap_bytes_allocated 2.147483648e9

# HELP cltron_gc_runs_total Total GC runs
# TYPE cltron_gc_runs_total counter
cltron_gc_runs_total 42

# HELP cltron_threads_active Active threads
# TYPE cltron_threads_active gauge
cltron_threads_active 5

See Also

  • @prompts/production-monitoring.md - Complete monitoring workflows