Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions superset/views/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"