Skip to content

Commit cf005c6

Browse files
authored
api: don't log requests to health endpoint (#70)
1 parent d7d3789 commit cf005c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ func versionHandler(h http.Handler, sha string) http.Handler {
108108

109109
func tracingHandler(env, service, sha string, h http.Handler) http.Handler {
110110
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
111+
if r.URL.Path == "/health" {
112+
h.ServeHTTP(w, r)
113+
return
114+
}
115+
111116
span, ctx := tracing.SpanFromContext(r.Context(), "http.request")
112117

113118
defer span.Finish()

0 commit comments

Comments
 (0)