Expand description
Metrics instrumentation for sync-engine.
Uses the metrics crate for backend-agnostic metrics collection.
The parent daemon is responsible for choosing the exporter (Prometheus, OTEL, etc.)
§Metric Naming Convention
sync_engine_prefix for all metrics_totalsuffix for counters_secondssuffix for duration histograms_bytessuffix for size histograms
§Labels
tier: L1, L2, L3operation: get, put, delete, batchstatus: success, error, rejected
Structs§
- Latency
Timer - A timing guard that records latency on drop
Functions§
- record_
batch_ bytes - Record batch bytes
- record_
batch_ size - Record batch size
- record_
bytes_ read - Record bytes read from a tier
- record_
bytes_ written - Record bytes written to a tier
- record_
cdc_ entries - Record CDC entries emitted to stream
- record_
circuit_ breaker_ call - Record circuit breaker call outcome
- record_
circuit_ call - Record circuit breaker call
- record_
connection_ error - Record a connection/backend error
- record_
corruption - Record data corruption detection
- record_
cuckoo_ check - Record cuckoo filter check
- record_
cuckoo_ false_ positive - Record cuckoo filter false positive
- record_
error - Record an error with category for alerting
- record_
eviction - Record eviction event
- record_
flush_ duration - Record batch flush duration
- record_
items_ written - Record items written
- record_
latency - Record operation latency
- record_
merkle_ operation - Record merkle tree operation
- record_
operation - Record a successful sync operation
- record_
search_ cache - Record search cache hit/miss
- record_
search_ index_ operation - Record index creation/drop
- record_
search_ latency - Record search query latency
- record_
search_ query - Record a search query execution
- record_
search_ results - Record search result count
- record_
startup_ phase - Record startup phase duration
- record_
startup_ total - Record total startup time
- record_
timeout - Record a timeout error
- record_
wal_ drain - Record WAL drain operation
- set_
backend_ healthy - Set backend health status (1 = healthy, 0 = unhealthy)
- set_
backpressure_ level - Set backpressure level (0 = None, 1 = Low, 2 = Medium, 3 = High, 4 = Critical)
- set_
batch_ queue_ bytes - Set batch queue size in bytes
- set_
batch_ queue_ items - Set batch queue depth (items pending flush)
- set_
circuit_ state - Record circuit breaker state change
- set_
cuckoo_ filter_ entries - Set cuckoo filter entry count
- set_
cuckoo_ filter_ load - Set cuckoo filter capacity utilization (0.0 - 1.0)
- set_
engine_ state - Set engine state (for monitoring state machine transitions)
- set_
l1_ cache_ bytes - Set current L1 cache size in bytes
- set_
l1_ cache_ items - Set current L1 cache item count
- set_
memory_ pressure - Set memory pressure level (0.0 - 1.0)
- set_
search_ cache_ stats - Set search cache stats gauge
- set_
wal_ bytes - Set WAL file size in bytes
- set_
wal_ entries - Set WAL pending entries