Skip to content

v0.7.0 — Prometheus Metrics

Choose a tag to compare

@HughesCuit HughesCuit released this 15 May 03:58

Prometheus Metrics Instrumentation

What's New

  • 22 unique hac_ domain metrics covering nodes, tasks, leases, and sync
  • API middleware records node registration, heartbeat, task creation, completion, and failure events
  • Gauge updaters for nodes, tasks, leases, and sync version
  • Duration metrics — task processing time measured from CreatedAt to completion/failure

Metrics Catalog

Metric Type Description
hac_nodes_registered_total counter Node registration events
hac_heartbeats_received_total counter Heartbeat events
hac_tasks_created_total counter Task creation events
hac_tasks_completed_total counter Task completion events
hac_tasks_failed_total counter Task failure events
hac_task_duration_seconds histogram Task processing duration
hac_nodes_online gauge Currently online nodes
hac_tasks_pending gauge Pending tasks
hac_leases_active gauge Active leases
hac_sync_version gauge Current sync version

Testing

  • All 27 metrics tests pass with -race detector
  • 11 new integration tests for API instrumentation
  • Concurrent access race-clean

Commits

  • adbe63c feat: add Prometheus metrics instrumentation to API handlers

Full diff: v0.6.0...v0.7.0