- Add src/metrics.js: zero-dep Prometheus text exposition for
api_requests_total (counter), api_response_duration_seconds (histogram),
api_data_freshness_seconds (gauge)
- Instrument src/server.js with onResponse hook recording every request;
add GET /metrics endpoint (no proxy-secret required)
- Update src/nhtsa.js to call recordNhtsaCall() after every successful
upstream NHTSA vPIC fetch (drives freshness gauge)
- Add src/tests/metrics.test.js: unit tests asserting /metrics returns
text with Content-Type text/plain, all three metric names present,
HELP/TYPE lines correct, counters increment, freshness is near-zero
- Add flux/vin-decoder/servicemonitor.yaml: ServiceMonitor for Prometheus
auto-discovery of the /metrics endpoint
- Update flux/vin-decoder/kustomization.yaml to include servicemonitor.yaml
Closesleeworks-agents/api-company#129