-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compact, receive, store: Init all labeled counter and histogram metrics #2893
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 lgtm. Let's get one more opinion and we can merge it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downsampleMetrics.downsamples.WithLabelValues(groupKey) | |
downsampleMetrics.downsampleFailures.WithLabelValues(groupKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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