Skip to content
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

query: metric type and scrape interval aware deduplication #5094

Open
yeya24 opened this issue Jan 23, 2022 · 3 comments
Open

query: metric type and scrape interval aware deduplication #5094

yeya24 opened this issue Jan 23, 2022 · 3 comments
Labels
component: query dont-go-stale Label for important issues which tells the stalebot not to close them feature request/improvement

Comments

@yeya24
Copy link
Contributor

yeya24 commented Jan 23, 2022

Is your proposal related to a problem?

The current deduplication algorithm is not perfect and there are still room to improve.

For example, we have issues like #981 and other deduplication issues related to counter metrics.
Also, the initial penalty value is set to 5000 by default https://github.com/thanos-io/thanos/blob/main/pkg/dedup/iter.go#L278. This value is reasonable, but we might be able to do better.

This is just a rough idea:
Prometheus has targets API and metric metadata API, which should be good enough for us to get the metrics type and the scrape interval of each scrape job.

Querier can maintain a cache and query Prometheus periodically to get this info. Ideally, this info can be set provided using some files as well (assuming metric type and scrape interval are hardly changed so users can provide a list of metrics). Then it can perform better deduplication based on the metric scrape interval and metrics type.

Describe the solution you'd like

(Describe your proposed solution here.)

Describe alternatives you've considered

(Write your answer here.)

@stale
Copy link

stale bot commented Apr 16, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Apr 16, 2022
@stale
Copy link

stale bot commented Apr 30, 2022

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Apr 30, 2022
@matej-g matej-g removed the stale label Oct 24, 2022
@matej-g
Copy link
Collaborator

matej-g commented Oct 24, 2022

Looks like this idea is still relevant, re-opening

@matej-g matej-g reopened this Oct 24, 2022
@matej-g matej-g added the dont-go-stale Label for important issues which tells the stalebot not to close them label Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: query dont-go-stale Label for important issues which tells the stalebot not to close them feature request/improvement
Projects
None yet
Development

No branches or pull requests

3 participants