From 513e35d4670e4fa8b85b03208174b1f2a2e30355 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Wed, 18 Jan 2023 12:33:20 +0200 Subject: [PATCH] chore(logging): add health checks to statsd --- superset/views/health.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/superset/views/health.py b/superset/views/health.py index cf85b8927899d..8b082ff88ffec 100644 --- a/superset/views/health.py +++ b/superset/views/health.py @@ -15,22 +15,15 @@ # specific language governing permissions and limitations # under the License. from superset import app, talisman +from superset.stats_logger import BaseStatsLogger from superset.superset_typing import FlaskResponse -@talisman(force_https=False) -@app.route("/ping") -def ping() -> FlaskResponse: - return "OK" - - -@talisman(force_https=False) -@app.route("/healthcheck") -def healthcheck() -> FlaskResponse: - return "OK" - - @talisman(force_https=False) @app.route("/health") +@app.route("/healthcheck") +@app.route("/ping") def health() -> FlaskResponse: + stats_logger: BaseStatsLogger = app.config["STATS_LOGGER"] + stats_logger.incr("health") return "OK"