chore(logging): add health checks to statsd (#22771)

This commit is contained in:
Ville Brofeldt 2023-01-20 13:21:36 +02:00 committed by GitHub
parent 1fe4a71f5b
commit 13a186bdc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 12 deletions

View File

@ -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"