Skip to content

Commit

Permalink
Merge branch 'master' of github.com:messagebird/pushprom
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel corso committed Mar 27, 2019
2 parents 9a7eb73 + 49acf1c commit 4361714
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: go

go:
- "1.11"
- "1.12"

before_install:
- GO111MODULE=on go mod vendor
Expand Down
5 changes: 4 additions & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ func listenHTTP(ctx context.Context, log plog.Logger) {
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.Handler())

log.Info("listening for stats on http://" + *httpListenAddress)
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "ok")
})

// Instrument the handlers with all the metrics, injecting the "handler"
// label by currying.
Expand All @@ -67,5 +69,6 @@ func listenHTTP(ctx context.Context, log plog.Logger) {
cancel()
}()

log.Info("listening for stats on http://" + *httpListenAddress)
log.Fatal(server.ListenAndServe())
}

0 comments on commit 4361714

Please sign in to comment.