You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "David Mao (Jira)" <ji...@apache.org> on 2020/11/08 00:28:00 UTC

[jira] [Created] (KAFKA-10695) Improve interface for sensor expiration

David Mao created KAFKA-10695:
---------------------------------

             Summary: Improve interface for sensor expiration
                 Key: KAFKA-10695
                 URL: https://issues.apache.org/jira/browse/KAFKA-10695
             Project: Kafka
          Issue Type: Improvement
          Components: metrics
            Reporter: David Mao


To check whether a sensor has expired, a user should be able to check the return value of {{Sensor.hasExpired()}}.{{ }}However, recording to an expired sensor isn't prohibited, and if a user does record to an expired sensor, we can lose the information that the sensor was expired and removed from metrics.

The way we work around this currently, is that all expiring sensors are retrieved from {{Metrics}} each time.

A potential improvement would be to add some internal state on whether a sensor has been expired (removed from {{Metrics)}}, and hasExpired should then return that internal state. To do this, we would need to add a new method in Sensor that expresses the intent of expiring a sensor.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)