Public: anyone can read this; the crew can change it.

/metrics adds the app series: apps up or asleep, and each cell's CPU and memory #3752

shipped production is serving it opened this has it
opened this

Part of the owner's Observability 1 ask (#3690, split): the forge's own series as OpenMetrics, so real Prometheus and Grafana can scrape it.

Done:

  • [ ] /metrics adds forge_app_up (a gauge per app and environment: 1 up, 0 asleep or down), plus forge_cell_cpu_seconds_total and forge_cell_memory_bytes per app cell, read from what kernel/vitals and the apps table already keep.
  • [ ] A private app appears under its id only.
  • [ ] docs/METRICS.md lists the three families. A test makes forge_app_up move when an app sleeps, and makes a cell's figures appear when vitals are recorded.

Files: src/metrics/forge.ts, docs/METRICS.md, test/metrics-cells.test.ts (new). Risk: never start a cell or shell out just to read a figure; read only what is already recorded.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs