Thalweg · API reference ← Main docs

Module observability

Module observability 

Source
Expand description

Observability for remote UDFs: per-service/function metrics and audit logging.

A single MetricsRegistry is created at registration and owned by the caller’s UdfRegistration handle, so metrics survive past registration and can be exported. Each remote UDF holds a cheap UdfMetrics clone (shared state behind Arc) and each service a ServiceMetrics clone; recording is lock-light and the registry renders everything as Prometheus text via MetricsRegistry::to_prometheus.

The distinct signals, per the implementation plan, are: a latency histogram, a call count, a timeout count, validation/transport failures by reason, and circuit-breaker state transitions.

Structs§

MetricsRegistry
Registry of all remote-UDF metrics, owned by the registration handle.
ServiceMetrics
State-machine transitions for the circuit breaker, exported per service.
UdfMetrics
Metrics for a single remote UDF (service + function), shared behind Arc.

Functions§

audit_log_invocation
Audit-log a remote UDF invocation.