Skip to content

Commit

Permalink
Merge pull request #191 from pace/silence-metrics
Browse files Browse the repository at this point in the history
Silence /metrics logs
  • Loading branch information
nicmue committed Apr 20, 2020
2 parents 511e272 + 9029cd1 commit d58e076
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions http/router.go
Expand Up @@ -24,10 +24,11 @@ func Router() *mux.Router {

r.Use(metricsMiddleware)

// the logging middleware needs to be registered before the error
// middleware to make it possible to send panics to sentry.
// "/health" is only logged to the log.Sink but not to log.output (silent)
r.Use(log.Handler("/health"))
// the logging middleware needs to be registered before the
// error middleware to make it possible to send panics to
// sentry. "/health" and "/metrics" are only logged to the
// log.Sink but not to log.output (silent)
r.Use(log.Handler("/health", "/metrics"))

// last resort error handler
r.Use(errors.Handler())
Expand Down

0 comments on commit d58e076

Please sign in to comment.