Skip to content

Metrics Snapshot

SegmentIndex.metricsSnapshot() exposes a stable, read-only metrics contract for index-level telemetry.

Current fields

  • Operation counters:
  • getOperationCount
  • putOperationCount
  • deleteOperationCount
  • Registry and segment state:
  • registryCache*
  • segment*
  • totalSegmentKeys
  • totalSegmentCacheKeys
  • totalBufferedWriteKeys
  • Partitioned ingest overlay:
  • maxNumberOfKeysInActivePartition
  • maxNumberOfImmutableRunsPerPartition
  • maxNumberOfKeysInPartitionBuffer
  • maxNumberOfKeysInIndexBuffer
  • partitionCount
  • activePartitionCount
  • drainingPartitionCount
  • immutableRunCount
  • partitionBufferedKeyCount
  • localThrottleCount
  • globalThrottleCount
  • drainScheduleCount
  • drainInFlightCount
  • drainLatencyP95Micros
  • WAL and latency:
  • wal*
  • readLatencyP50/P95/P99Micros
  • writeLatencyP50/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.
  • partitionBufferedKeyCount counts only overlay-resident keys; it is a subset of totalBufferedWriteKeys.
  • Legacy split* and maintenance* fields remain in the snapshot for compatibility, but partition-specific fields are the authoritative view for the new ingest runtime.
  • state is one of OPENING, READY, CLOSING, CLOSED, or ERROR.
  • CLOSING means 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.