Metrics Snapshot
SegmentIndex.metricsSnapshot() exposes a stable, read-only metrics contract
for index-level telemetry.
Current fields
- Operation counters:
getOperationCountputOperationCountdeleteOperationCount- Registry and segment state:
registryCache*segment*totalSegmentKeystotalSegmentCacheKeystotalBufferedWriteKeys- Partitioned ingest overlay:
maxNumberOfKeysInActivePartitionmaxNumberOfImmutableRunsPerPartitionmaxNumberOfKeysInPartitionBuffermaxNumberOfKeysInIndexBufferpartitionCountactivePartitionCountdrainingPartitionCountimmutableRunCountpartitionBufferedKeyCountlocalThrottleCountglobalThrottleCountdrainScheduleCountdrainInFlightCountdrainLatencyP95Micros- WAL and latency:
wal*readLatencyP50/P95/P99MicroswriteLatencyP50/P95/P99Micros- Lifecycle:
state
Semantics
- Snapshot is immutable.
- Counts are monotonic for one index instance lifetime.
- Counters are process-local and reset when a new index object is created.
- Field values represent observed operation calls, not necessarily durable writes on disk.
partitionBufferedKeyCountcounts only overlay-resident keys; it is a subset oftotalBufferedWriteKeys.- Legacy
split*andmaintenance*fields remain in the snapshot for compatibility, but partition-specific fields are the authoritative view for the new ingest runtime. stateis one ofOPENING,READY,CLOSING,CLOSED, orERROR.CLOSINGmeans shutdown is in progress and the index is no longer accepting new API operations, but final persistence/cleanup work may still be running.
Compatibility policy
- Existing fields and meaning are stable and cannot change silently.
- New fields may be added in future versions.
- Consumers should ignore unknown fields for forward compatibility.