Status

Current state: Draft

Discussion thread: here

JIRA: here

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

We should add metrics for the RemoteIndexCache which is a cache of remote index files. The cache helps in avoiding re-fetching the index files like offset, and time indexes from the remote storage for every fetch call. Adding these metrics will improve the observability required for debugging issues.

Public Interfaces

The following metrics will be added to expose cache stats for the Remote Index Cache.

Name

Description

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=HitCount

The number of cache hits for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=MissCount

The number of cache misses for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=EvictionCount

The number of entries evicted from the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=LoadSuccessCount

The number of successful cache loads for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=LoadFailureCount

The number of failed cache loads for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=TotalLoadTime

Total load time (success and failure) for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=EvictionWeight

The sum of weights of entries evicted from the remote index cache.

Compatibility, Deprecation, and Migration Plan

We are only adding new metrics so we don't have to take care of backward compatibility.

Test Plan

Unit Tests for all the introduced metrics in this KIP.

Rejected Alternatives

None


  • No labels