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§
- Metrics
Registry - Registry of all remote-UDF metrics, owned by the registration handle.
- Service
Metrics - 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.