# Task 02 — Metrics / Health Surface **Goal:** expose runtime stats (uptime, WAL lag, open handles) without requiring full observability stack. ## Deliverables - Optional HTTP endpoint (disabled by default) serving `/metrics` (Prometheus text) and `/healthz` (JSON). - Builder flag `enable_metrics(addr)` + `with_metrics(false)` toggle for tests. - Metrics counters tagged with `process`, `partition_id`, `build_hash` for future distributed rollouts. ## Acceptance Criteria - Endpoint can run on the same Tokio runtime as host service (returns `Future` implementor). - Minimal deps (hyper/tiny_http) to keep embeddable footprint light. - Integration test hits `/metrics` and asserts counters increment when WAL appends.