Skip to content

Commit

Permalink
pkg/receive: register handler metrics (#1261)
Browse files Browse the repository at this point in the history
The thanos receive component instruments its handler with some metrics
but these metrics are currently never registered.
  • Loading branch information
squat authored and brancz committed Jun 19, 2019
1 parent c7da9f2 commit b3256e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/receive/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ func NewHandler(logger log.Logger, o *Options) *Handler {
readyf := h.testReady
router.Post("/api/v1/receive", readyf(h.receive))

if o.Registry != nil {
o.Registry.MustRegister(
requestDuration,
responseSize,
)
}

return h
}

Expand Down

0 comments on commit b3256e0

Please sign in to comment.