track http status codes in metrics

This commit is contained in:
sm
2018-01-26 18:07:20 -08:00
parent cf10974419
commit 5997dc44d8
4 changed files with 24 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ func main() {
}
s := &hwt.Server{hn}
hs := hwt.NewMetricsHooks(metrics.HTTPLatency)
hs := hwt.NewMetricsHooks(metrics.HTTPLatency, metrics.HTTPCode)
th := pb.NewHelloWorldServer(s, hs)
sm := http.NewServeMux()
sm.HandleFunc("/", hwt.Auth(th.ServeHTTP))