Skip to content

Commit

Permalink
Add health-check endpoint counter
Browse files Browse the repository at this point in the history
  • Loading branch information
panchoh authored and iknite committed Feb 19, 2019
1 parent 0897e99 commit 74f758a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/apihttp/apihttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ type HealthCheckResponse struct {
// If everything is allright, the HTTP status is 200 and the body contains:
// {"version": "0", "status":"ok"}
func HealthCheckHandler(w http.ResponseWriter, r *http.Request) {

metrics.API_healthcheck_requests_total.Inc()

timer := prometheus.NewTimer(metrics.RequestDuration)
defer timer.ObserveDuration()

Expand Down

0 comments on commit 74f758a

Please sign in to comment.