Skip to content

Commit

Permalink
Disable logging and metrics for health checks (#499)
Browse files Browse the repository at this point in the history
These end up adding a lot of noise to logs and are rarely useful.
  • Loading branch information
bluekeyes authored Mar 21, 2024
1 parent b8b52fc commit c4b1821
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/handler/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type HealthCheck struct {

func Health() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
baseapp.IgnoreAll(r)
baseapp.WriteJSON(w, http.StatusOK, &HealthCheck{Status: "ok", Version: version.GetVersion()})
})
}

0 comments on commit c4b1821

Please sign in to comment.