From def46c06956c9303d21633365b52b1eaee5bf604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n=20Mar=C3=ADn?= Date: Wed, 19 Jun 2019 14:28:16 +0200 Subject: [PATCH] pkg/receive: register handler metrics The thanos receive component instruments its handler with some metrics but these metrics are currently never registered. --- pkg/receive/handler.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/receive/handler.go b/pkg/receive/handler.go index c96cde5d76..45c4a1dc6c 100644 --- a/pkg/receive/handler.go +++ b/pkg/receive/handler.go @@ -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 }