Documentation
¶
Overview ¶
Package metrics records per-stage durations from internal/handler and exposes p50/p95 via cmd/rinwall's /metrics endpoint, so the latency claims in docs/REFERENCE.md are numbers rather than assertions. Deliberately not Prometheus/OTel yet - an export is on the roadmap; this is the minimum needed to measure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func (*Recorder) IncrementCounter ¶
IncrementCounter tracks a discrete event rather than a duration - e.g. "vault_unavailable", so an operator can tell "Vault specifically is failing" apart from a generic slow stage in /metrics without having to grep logs for it.
type Snapshot ¶
type Snapshot struct {
Stages map[string]StageStats `json:"stages"`
Counters map[string]int64 `json:"counters"`
}
Snapshot is stages (latency distributions) plus counters (discrete event totals) - separate shapes because they answer different questions: "how slow" vs. "how often did this specific bad thing happen."