Custom Health Check

Warning

Custom Health Check extensions will be executed at least once a minute, and could be executed more if something is failing. Please make sure the external systems that are tested for uptime can handle the additional call load.

Custom Health Check endpoints allows for additional status checks to be added to the Q2 Health Check (/status). This can call external APIs to check to see if the service is up and quickly give a snap shot of all services (Q2 and external) used for any extension.

class q2_sdk.core.non_http_handlers.custom_health_check_handler.CustomHealthCheckResponse(name, is_healthy, failure_reason=None, additional_details=None)[source]

The response object that is expected in the status endpoint

Parameters:
  • name (str) – The name of this health check

  • is_healthy (bool) – Whether to mark this check has healthy or not

  • failure_reason – The reason for health check failure

  • additional_details – Any additional details to include in the status page

class q2_sdk.core.non_http_handlers.custom_health_check_handler.CustomHealthCheckHandler(logger)[source]

Parent class of the health check

Parameters:

logger (TypeAliasType) – Instance of Q2Logger

async run()[source]
Return type:

CustomHealthCheckResponse