Skip to main content

Crate lnc_metrics

Crate lnc_metrics 

Source

Re-exports§

pub use golden_signals::ERRORS_BY_TYPE;
pub use golden_signals::ERRORS_TOTAL;
pub use golden_signals::ErrorType;
pub use golden_signals::GoldenSignalsSnapshot;
pub use golden_signals::LATENCY_FETCH;
pub use golden_signals::LATENCY_INGEST;
pub use golden_signals::LATENCY_IO;
pub use golden_signals::LATENCY_NETWORK;
pub use golden_signals::LATENCY_REPLICATION;
pub use golden_signals::LATENCY_SAMPLE_RATE;
pub use golden_signals::LatencyHistogram;
pub use golden_signals::LatencySnapshot;
pub use golden_signals::LatencyTimer;
pub use golden_signals::RATE_INGEST_BYTES;
pub use golden_signals::RATE_INGEST_OPS;
pub use golden_signals::RATE_READ_BYTES;
pub use golden_signals::RATE_READ_OPS;
pub use golden_signals::RateTracker;
pub use golden_signals::SATURATION_BUFFER_POOL_TOTAL;
pub use golden_signals::SATURATION_BUFFER_POOL_USED;
pub use golden_signals::SATURATION_CONNECTIONS_MAX;
pub use golden_signals::SATURATION_CONNECTIONS_USED;
pub use golden_signals::SATURATION_MEMORY_TOTAL;
pub use golden_signals::SATURATION_MEMORY_USED;
pub use golden_signals::SATURATION_PENDING_IO;
pub use golden_signals::SATURATION_QUEUE_CAPACITY;
pub use golden_signals::SATURATION_QUEUE_DEPTH;
pub use golden_signals::SampledTimer;
pub use golden_signals::buffer_pool_saturation;
pub use golden_signals::get_error_count;
pub use golden_signals::get_total_errors;
pub use golden_signals::memory_saturation;
pub use golden_signals::queue_saturation;
pub use golden_signals::record_error;
pub use golden_signals::record_fetch_latency;
pub use golden_signals::record_fetch_latency_sampled;
pub use golden_signals::record_ingest_latency;
pub use golden_signals::record_ingest_latency_sampled;
pub use golden_signals::record_io_latency;
pub use golden_signals::record_io_latency_sampled;
pub use golden_signals::record_network_latency;
pub use golden_signals::record_peer_replication_latency;
pub use golden_signals::record_replication_latency;
pub use golden_signals::saturation_ratio;
pub use golden_signals::set_buffer_pool_usage;
pub use golden_signals::set_connection_usage;
pub use golden_signals::set_latency_sample_rate;
pub use golden_signals::set_memory_usage;
pub use golden_signals::set_pending_io;
pub use golden_signals::set_queue_depth;
pub use golden_signals::should_sample;
pub use golden_signals::time_fetch;
pub use golden_signals::time_fetch_sampled;
pub use golden_signals::time_ingest;
pub use golden_signals::time_ingest_sampled;
pub use golden_signals::time_io;
pub use golden_signals::time_io_sampled;
pub use golden_signals::update_rates;

Modules§

golden_signals
4 Golden Signals Metrics
otlp
OTLP (OpenTelemetry Protocol) export implementation.

Structs§

LocalSpan
Simple span for local tracing
MetricsSnapshot
SpanContext
Span context for distributed tracing
TracingConfig
Tracing configuration

Enums§

OperationType
Operation types for tracing

Statics§

BACKPRESSURE_EVENTS
BATCHES_WRITTEN
BYTES_INGESTED
BYTES_WRITTEN
CLUSTER_APPLY_LAG_AT_ELECTION
CLUSTER_APPLY_LAG_ENTRIES
CLUSTER_COORDINATOR_READY
CLUSTER_COORDINATOR_TICK_DRIFT_MS
CLUSTER_CURRENT_TERM
CLUSTER_ELECTED_NOT_READY_REJECTS
CLUSTER_HEALTHY_NODES
CLUSTER_IS_LEADER
CLUSTER_LEADER_ID
CLUSTER_LEADER_READY
CLUSTER_LEADER_READY_TRANSITION_MS
CLUSTER_NODE_COUNT
CLUSTER_QUORUM_AVAILABLE
CONNECTIONS_ACTIVE
CONNECTIONS_TOTAL
CONSUMER_THROTTLED
CONTROL_RPC_IN_FLIGHT
CONTROL_RPC_STARVATION
CRC_FAILURES
FOLLOWER_EVICTIONS
FOLLOWER_RECOVERIES
HLC_DRIFT_CRITICAL
HLC_DRIFT_MS
HLC_DRIFT_WARNINGS
HLC_LOGICAL_EXHAUSTED
IO_OPS_COMPLETED
IO_OPS_SUBMITTED
NUMA_MISALIGNED
POOL_EXHAUSTED
QUORUM_FAILURES
QUORUM_TIMEOUTS
RAFT_ELECTIONS_STARTED
RAFT_ELECTIONS_WON
RAFT_ELECTION_ROUND_LAST_MS
RAFT_ELECTION_STORMS
RAFT_ELECTION_WINDOW_COUNT
RAFT_FENCING_REJECTIONS
RAFT_LEADER_STEPDOWNS
RAFT_LEADER_TENURE_AVG_MS
RAFT_LEADER_TENURE_ENDED
RAFT_LEADER_TENURE_LAST_MS
RAFT_LEADER_TENURE_SUM_MS
RAFT_PRE_VOTES_REJECTED
READS_TOTAL
READ_BYTES_TOTAL
RECORDS_INGESTED
REPLICATION_LAG_BYTES
REPLICATION_LAST_SYNC_MS
REPLICATION_PENDING_OPS
RESYNC_BYTES_TRANSFERRED
RESYNC_COMPLETED
RESYNC_FAILED
RESYNC_SEGMENTS_TRANSFERRED
RESYNC_STARTED
ZERO_COPY_SENDS

Functions§

cluster_coordinator_ready
Read current coordinator readiness as bool.
decrement_connections
decrement_control_rpc_in_flight
Decrement in-flight control RPCs.
decrement_replication_pending_ops
Decrement pending replication operations.
export_to_prometheus
increment_backpressure
increment_batches_written
increment_bytes_ingested
increment_bytes_written
increment_cluster_elected_not_ready_rejects
Increment counter for requests rejected while leader was elected but not ready.
increment_connections
increment_consumer_throttled
Increment consumer throttled events counter.
increment_control_rpc_in_flight
Increment in-flight control RPCs.
increment_control_rpc_starvation
Increment control RPC starvation/contention counter.
increment_crc_failures
increment_follower_evictions
increment_follower_recoveries
increment_hlc_drift_critical
Increment HLC drift critical counter (drift > 1s).
increment_hlc_drift_warnings
Increment HLC drift warning counter (drift > 100ms).
increment_hlc_logical_exhausted
Increment HLC logical counter exhausted events.
increment_io_completed
increment_io_submitted
increment_numa_misaligned
increment_pool_exhausted
increment_quorum_failures
increment_quorum_timeouts
increment_raft_election_storms
Increment election storm detector counter.
increment_raft_elections_started
Increment Raft elections started counter.
increment_raft_elections_won
Increment Raft elections won counter.
increment_raft_fencing_rejections
Increment Raft fencing rejection counter.
increment_raft_leader_stepdowns
Increment Raft leader stepdown counter.
increment_raft_pre_votes_rejected
Increment Raft pre-votes rejected counter.
increment_read_bytes
Increment total bytes read counter.
increment_reads
Increment total read operations counter.
increment_records_ingested
increment_replication_pending_ops
Increment pending replication operations.
increment_resync_bytes_transferred
Increment bytes transferred during resync.
increment_resync_completed
Increment resync sessions completed successfully.
increment_resync_failed
Increment resync sessions that failed.
increment_resync_segments_transferred
Increment segments transferred during resync.
increment_resync_started
Increment resync sessions started counter.
increment_zero_copy_sends
Increment zero-copy sends counter (per Architecture §17.7)
init_prometheus_exporter
init_tracing
Initialize tracing (placeholder - actual implementation would use tracing-subscriber)
record_raft_election_round_ms
Record election round wall-clock duration and publish histogram sample.
record_raft_leader_tenure_ms
Record leader tenure end and update rolling gauges.
record_raft_pre_vote_rpc_latency_ms
Record a pre-vote RPC round-trip latency sample.
record_raft_vote_rpc_latency_ms
Record a vote RPC round-trip latency sample.
set_cluster_apply_lag_at_election
Set apply lag captured at/after election while readiness is pending.
set_cluster_apply_lag_entries
Set current commit/apply lag (entries).
set_cluster_coordinator_ready
Set whether coordinator control-plane is healthy/readiness-eligible.
set_cluster_coordinator_tick_drift_ms
Set coordinator loop tick drift in milliseconds.
set_cluster_current_term
Set the current Raft term.
set_cluster_healthy_nodes
Set the number of healthy (connected) nodes.
set_cluster_is_leader
Set whether this node is the leader (1 = leader, 0 = follower).
set_cluster_leader_id
Set the current cluster leader ID.
set_cluster_leader_ready
Set whether this node is leader-ready (1 = yes, 0 = no).
set_cluster_leader_ready_transition_ms
Set elapsed milliseconds from election win to ready-authoritative transition.
set_cluster_node_count
Set the total number of nodes in the cluster.
set_cluster_quorum_available
Set whether quorum is available (1 = yes, 0 = no).
set_hlc_drift_ms
Update the current HLC drift in milliseconds.
set_raft_election_window_count
Set count of elections observed in current storm window.
set_replication_lag_bytes
Set the replication lag in bytes (how far behind the leader).
set_replication_last_sync_ms
Set the time since last successful sync in milliseconds.
set_replication_pending_ops
Set the number of pending replication operations.