DEV Community

Cover image for ✅ Milestone Completed: Prometheus Data Format Integration
Farhan Munir
Farhan Munir

Posted on

✅ Milestone Completed: Prometheus Data Format Integration

✅ Milestone Completed: Prometheus Data Format Integration

This sprint focused on making telemetry output fully Prometheus-compatible while preserving our existing collector pipeline for CPU, memory, and disk I/O.

What I implemented

  • Added Prometheus text exposition format (v0.0.4) output
  • Included # HELP and # TYPE metadata
  • Supported gauge and counter metric families
  • Added label-based dimensions (CPU modes, disk devices)
  • Kept output deterministic and scrape-ready for a /metrics style endpoint

Metrics now covered

  • CPU usage and per-mode CPU time distribution
  • Virtual memory: used, available, total
  • Swap memory: used, total
  • Disk I/O bytes: read/write (aggregate + per-device)
  • Disk I/O operations: read/write (aggregate + per-device)

Validation results

  • Output verified against Prometheus exposition rules
  • No syntax violations found
  • Metrics are parseable and scrape-ready

Prior milestone context (OpenMetrics)

Before this, I shipped OpenMetrics-aligned output for the same core Linux host metrics with:

  • # HELP, # TYPE, # UNIT metadata
  • # EOF termination
  • Valid CPU, memory, and disk payload output

Next improvements

  • Evaluate ratio-based CPU values (0–1) vs percentage
  • Extend optional unit handling for stronger tooling interoperability
  • Continue OpenMetrics alignment where needed

Repo: https://github.com/ronin1770/heka-insights-agent

Top comments (0)