compact, receive, store: Init all labeled counter and histogram metrics#2893
compact, receive, store: Init all labeled counter and histogram metrics#2893bwplotka merged 2 commits intothanos-io:masterfrom
Conversation
|
I am not sure about this one https://github.com/thanos-io/thanos/blob/master/pkg/store/bucket.go#L198-L201. Why this is a counter metric, not a histogram or summary metric? |
kakkoyun
left a comment
There was a problem hiding this comment.
💯 lgtm. Let's get one more opinion and we can merge it.
belm0
left a comment
There was a problem hiding this comment.
LGTM from the humble issue reporter
|
@pstibrany Hello, for this metric https://github.com/thanos-io/thanos/blob/master/pkg/store/bucket.go#L198-L201, is it intended to be a counter or a histogram? It doesn't have |
Hi, it’s supposed to be counter and missing |
I can fix the name in another commit this pr if you don't mind. |
That would be great, thanks a lot! |
Signed-off-by: Ben Ye <yb532204897@gmail.com>
Done. Note that update is also needed on the Cortex side. https://github.com/cortexproject/cortex/blob/aa0d48adf6309a406e34b2d9e467787328312efb/pkg/storegateway/bucket_store_metrics.go#L111 😄 |
Definitely! We'll address it the next Thanos update in Cortex, once this PR is merged. |
pracucci
left a comment
There was a problem hiding this comment.
LGTM (modulo a fix in the downsampleFailures metric init)
cmd/thanos/compact.go
Outdated
| for _, meta := range sy.Metas() { | ||
| groupKey := compact.DefaultGroupKey(meta.Thanos) | ||
| downsampleMetrics.downsamples.WithLabelValues(groupKey) | ||
| downsampleMetrics.downsamples.WithLabelValues(groupKey) |
There was a problem hiding this comment.
| downsampleMetrics.downsamples.WithLabelValues(groupKey) | |
| downsampleMetrics.downsampleFailures.WithLabelValues(groupKey) |
There was a problem hiding this comment.
Done. Thanks for catching this.
Btw just found another bug here https://github.com/thanos-io/thanos/blob/master/cmd/thanos/downsample.go#L234.
…time_seconds Signed-off-by: Ben Ye <yb532204897@gmail.com>
bwplotka
left a comment
There was a problem hiding this comment.
This is epic, thanks 💪
Some linter for that at some point would be nice ;p
Signed-off-by: Ben Ye yb532204897@gmail.com
Changes
Fixes #2889
Verification