Expand description
Pipeline-internal observability: tracing spans and metrics counters/
histograms wired automatically around every source, sink, transform, and
state-store operation. See
docs/superpowers/specs/2026-05-23-observability-otel-prometheus-design.md.
Structs§
- Duration
Guard - On
Drop, records the elapsed time since construction into the named histogram with the supplied labels. Recording on drop guarantees a sample even if the surrounding future is cancelled or panics. - Install
Report - Report from
install_observabilityso callers can log what actually happened (recorder installed vs. already-installed vs. disabled). - Instrumented
Sink - Wraps a
&dyn Sink(or any&S: Sink) and emits spans + metrics aroundwrite_batchandflush. Constructed byPipeline::run. - Instrumented
Source - Wraps a
&dyn Source(or any&S: Source) and emits spans + metrics around every call. Constructed byPipeline::runand never exposed to end users; the wrapped source remains the user-facing object. - Instrumented
State Store - Wraps an
Arc<dyn StateStore>and emits faucet.state.* spans + metrics around every operation. - Labels
- Common labels carried by every span and metric.
- Observability
Config - Configuration for
install_observability. Either or both sections may beNone; unset sections install nothing. - Prometheus
Config - RunStream
Options - Tracing
Config
Enums§
Functions§
- install_
observability - Install observability if requested. Always returns; never panics.
- instrumented_
apply_ quality quality - Apply the quality pass and emit metrics. Returns the same outcome as
apply_quality; on abort, incrementsfaucet_quality_aborts_totalbefore propagating the error. - instrumented_
apply_ stages - Apply a sequence of compiled stages to every record in
records, flat-mapping per stage. Emits onefaucet.transform.applyspan and countersfaucet_transform_records_in_total/_records_out_totalper call (per page). - register_
build_ info - Register the
faucet_build_info{version}gauge (set to 1) under the currently-installedmetricsrecorder. Safe to call from any code path that wants to ensure the gauge is set;install_observabilityinvokes this automatically. Gauges are naturally idempotent under themetricsmodel — repeat calls just re-set the same value. - strip_
type_ name - Strip a Rust
type_namestring to its final path segment. - update_
bookmark_ lag - Update the bookmark-lag gauges if the bookmark is a parseable RFC3339
timestamp. Returns
trueif the gauges were updated,falseotherwise.