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.
Modules§
- otel
- OpenTelemetry (OTLP) export of traces + metrics (#201).
- resilience
- Metric registration + emit helpers for the unified resilience policy
(retry/backoff, circuit breaker, poison-pill). See
docs/superpowers/specs/2026-06-17-resilience-policy-design.md(§Metrics).
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 Non- observability-install - Non-
observability-installstub. Returns an empty report, never panics. - instrumented_
apply_ contract - Apply the contract pass and emit metrics. Returns the same outcome as
apply_contract; on afail-policy breach, incrementsfaucet_contract_aborts_totalbefore propagating the error. - instrumented_
apply_ masking - Apply the masking pass and emit metrics. Infallible — masking rewrites
matching fields in place and never fails a run. Increments
faucet_masking_fields_total{pipeline,row,rule,action,detector}once per masked field (detectoris""for name-based matches). - instrumented_
apply_ 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
records(a full page). Per-record stages flat-map over each record;PageFnstages transform the whole page at once. 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. - schema_
drift - Emit
faucet_schema_drift_total{pipeline,row,connector,mode,kind}for a detected drift:countcolumns ofkindhandled under policymode. No-op whencount == 0. - 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.