Documentation
¶
Overview ¶
Package observability owns Astrate's Prometheus registry and the health/readiness/metrics HTTP surface under /astrate/v1 (docs/DESIGN.md §5.2). The engine and trigger executor self-register their collectors through Registerer(); the broker-session and DB-pool gauges are attached from caller-supplied closures, so this package imports neither the broker nor the store and stays at the top of the dependency order.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
Check reports a dependency's readiness; a nil error means ready. The store DB ping and a broker-listener check are the two §5.2 readiness backends.
type DBPoolStats ¶
DBPoolStats is the subset of pgxpool.Stat exposed as gauges; the caller maps store.Stat() onto it (keeping pgx out of this package).
type Health ¶
type Health struct {
// contains filtered or unexported fields
}
Health is the Astrate-native operational surface (docs/DESIGN.md §5.2): liveness, readiness, and the Prometheus scrape endpoint, all under /astrate/v1 so they never collide with the upstream API namespace.
func (*Health) AddReadiness ¶
AddReadiness registers a named dependency probed by /readiness.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics owns the process-wide Prometheus registry.
func NewMetrics ¶
func NewMetrics() *Metrics
NewMetrics builds a registry preloaded with the Go runtime and process collectors (go_*, process_* — the RSS/GC budget of §5.4 reads them).
func (*Metrics) RegisterBrokerSessions ¶
RegisterBrokerSessions publishes astrate_broker_sessions, read on scrape from fn (broker.SessionCount).
func (*Metrics) RegisterDBPool ¶
func (m *Metrics) RegisterDBPool(fn func() DBPoolStats)
RegisterDBPool publishes the astrate_db_pool_* gauges, read on scrape from fn (a snapshot of store.Stat()).
func (*Metrics) Registerer ¶
func (m *Metrics) Registerer() prometheus.Registerer
Registerer is the engine's Prometheus.Registerer (engine + executor + stream bus collectors attach here).