Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.