Observability
Detent exposes what you need to answer two questions: is configuration fresh? and are reads succeeding?
Reader Diagnostics
Section titled “Reader Diagnostics”A detent::Reader keeps no counters and exports nothing; two calls answer both
questions:
auto revision = reader.revision("checkout"); // std::optional<std::uint64_t>auto result = reader.lookup("checkout:new_path", 0);if (!result) log(detent_status_name(result.status));- Freshness.
revision(namespace)is the revision of the namespace’s attached generation, or empty when none is attached yet. Compare it with the revision the authority committed. - Read health.
lookup(name, fallback).statussays why a read returned its fallback:MISSING,UNAVAILABLE,SOURCE_FAILUREand the rest in Errors and Failures.
Python returns revision() as an int or None and lookup() as a Lookup
with .status and .value; Rust returns Option<u64> and
Result<i64, Status>.
Suggested Alerts
Section titled “Suggested Alerts”- Staleness. A namespace’s
revisionbehind the authority’s committed revision for longer than your kill switches can tolerate. - Unavailable reads.
UNAVAILABLEorSOURCE_FAILUREfromlookupafter startup: the host’s agent has no usable generation. - Missing reads.
MISSINGfor a name your code reads: a typo, or a knob that was never published.
Knob names, hash values, switch values and knob values belong in none of these signals’ labels, so cardinality stays bounded and user identifiers never leak into monitoring.
Daemon Health
Section titled “Daemon Health”GET /v1/healthon the authority.detent-authority --statusanddetent-agent --statusfrom the command line.- Daemon logs, described in Logging.
What’s Never Logged
Section titled “What’s Never Logged”Hash values, switch values and knob values are never logged, and rejected publishes are logged by category without their payload. Hash and switch values are often user or tenant identifiers.