d2bd records broker_request_total and other counters into an in-process Prometheus registry (packages/d2bd/src/metrics.rs record_broker_request), but there is no live serving path a scraper can reach (verified: no metrics.sock/metrics listener in packages/d2bd; no prometheus.scrape wiring in nixos-modules/components/observability). The R8 attempt to multiplex /metrics through the public SOCK_SEQPACKET socket was reverted (commit 7dc401b) because Prometheus speaks SOCK_STREAM and fails with EPROTOTYPE.
The design is recorded in TODO.md's 'Scrapable /metrics endpoint' entry: a dedicated SOCK_STREAM AF_UNIX socket from d2bd (e.g. /run/d2b/metrics.sock, d2b-launchers group ACL) with prometheus.scrape config in the observability components.
Acceptance criteria:
- A metrics socket exists after daemon start and
curl --unix-socket /run/d2b/metrics.sock http://localhost/metrics returns the registry including broker_request_total.
- The socket is bound to d2b-launchers with the documented ACL.
- The observability example config scrapes it.
- The Phase-6 tracker row is closed.
d2bd records
broker_request_totaland other counters into an in-process Prometheus registry (packages/d2bd/src/metrics.rsrecord_broker_request), but there is no live serving path a scraper can reach (verified: no metrics.sock/metrics listener in packages/d2bd; noprometheus.scrapewiring in nixos-modules/components/observability). The R8 attempt to multiplex/metricsthrough the public SOCK_SEQPACKET socket was reverted (commit 7dc401b) because Prometheus speaks SOCK_STREAM and fails with EPROTOTYPE.The design is recorded in TODO.md's 'Scrapable /metrics endpoint' entry: a dedicated SOCK_STREAM AF_UNIX socket from d2bd (e.g. /run/d2b/metrics.sock, d2b-launchers group ACL) with prometheus.scrape config in the observability components.
Acceptance criteria:
curl --unix-socket /run/d2b/metrics.sock http://localhost/metricsreturns the registry including broker_request_total.