Documentation
¶
Overview ¶
Package metrics defines fabriq's Prometheus instruments. Binaries register them on their registry (forge exposes /_/metrics); library code receives the instruments it needs as plain callbacks/gauges so core stays dependency-free.
Operational meaning (see docs/OPERATIONS.md for runbooks):
- fabriq_outbox_backlog: unpublished outbox rows. Sustained growth means the relay is down or Redis is unreachable.
- fabriq_tenant_hook_trips_total: the tenant backstop fired. Any non-zero value in production is a fabriq bug — page.
- fabriq_conflation_depth: deltas buffered in the hub. Sustained growth means subscribers cannot keep up.
- fabriq_projection_lag_events{projection,tenant}: events behind the stream head (phase 4 wires per-consumer measurement).
- fabriq_relay_published_total: relay publish throughput.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
OutboxBacklog prometheus.Gauge
TenantHookTrips prometheus.Counter
ConflationDepth prometheus.Gauge
ProjectionLag *prometheus.GaugeVec
RelayPublished prometheus.Counter
// Blob CAS garbage-collection instruments.
BlobGCBytesFreed prometheus.Counter
BlobGCCollected prometheus.Counter
BlobGCRefDriftCorrected prometheus.Counter
BlobGCBroken prometheus.Gauge
BlobGCOrphans prometheus.Counter
// Embedding worker (proj:embed) instruments.
EmbedEventsTotal prometheus.Counter
EmbedFailuresTotal prometheus.Counter
// Distillation worker (proj:distill) instruments.
DistillNodesTotal prometheus.Counter
DistillSummariesTotal prometheus.Counter
DistillShortCircuitTotal prometheus.Counter
DistillGuardBlockedTotal prometheus.Counter
DistillFailuresTotal prometheus.Counter
}
Metrics bundles fabriq's instruments.
func New ¶
func New(reg prometheus.Registerer) (*Metrics, error)
New creates and registers the instruments on reg.
Click to show internal directories.
Click to hide internal directories.