You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2023/01/20 11:21:58 UTC
[superset] branch master updated: chore(logging): add health checks to statsd (#22771)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 13a186bdc2 chore(logging): add health checks to statsd (#22771)
13a186bdc2 is described below
commit 13a186bdc26a004a20eeb832dd35eff459893793
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Fri Jan 20 13:21:36 2023 +0200
chore(logging): add health checks to statsd (#22771)
---
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 cf85b89278..8b082ff88f 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"