def METHOD_NAME(app, conffile):
    """Fail early if the app configuration looks incorrect"""
    # TODO: fallback to reasonable defaults as much as possible instead
    conf_keys = (
        "ACCOUNT_ID_HASHING_KEY",
        "BASE_URL",
        "COLLECTORS",
        "COLLECTOR_ID",
        "DATABASE_STATEMENT_TIMEOUT",
        "CLICKHOUSE_URL",
        "GITHUB_ORIGIN_REPO",
        "GITHUB_PUSH_REPO",
        "GITHUB_TOKEN",
        "GITHUB_USER",
        "GITHUB_WORKDIR",
        "JWT_ENCRYPTION_KEY",
        "MAIL_PASSWORD",
        "MAIL_PORT",
        "MAIL_SERVER",
        "MAIL_SOURCE_ADDRESS",
        "MAIL_USERNAME",
        "MAIL_USE_SSL",
        "MSMT_SPOOL_DIR",
        "PSIPHON_CONFFILE",
        "S3_ACCESS_KEY_ID",
        "S3_BUCKET_NAME",
        "S3_ENDPOINT_URL",
        "S3_SECRET_ACCESS_KEY",
        "S3_SESSION_TOKEN",
        "TOR_TARGETS_CONFFILE",
    )
    for k in conf_keys:
        if k not in app.config:
            app.logger.error(f"Missing configuration key {k} in {conffile}")
            # exit with 4 to terminate gunicorn
            sys.exit(4)