AppMetrics / Health

App Metrics Health is an open-source and cross-platform .NET library used to define and report application health checks

Home Page:http://app-metrics.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Manual settable health check result - Possible new feature

felixcollins opened this issue · comments

Background
For many services the dependencies (sql server, third party web services etc) will frequently be implicitly tested in the normal course of operation. This means that extra explicit checks to those dependencies are redundant.
Proposal
This feature would provide a way for the service code to "manually" update the cached health check result. This result would remain valid for some cache expiry time and would be served out to requests for health checks. So under normal operating conditions we would never have to run the explicit health check. The explicit health check would remain of course as a fall back for the situation where the load on the server is too light to provide a sufficiently frequently updated check.
Implemention
We are happy to implement something and provide a pull request. The design of the HealthCheck class is not extensible but we could implement this feature modifying HealthCheck. By exposing a IManualResultUpdate interface on HealthCheck we would provide access to update the cached result.