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

Fix issue where annotations would not be returned for sharded queries #9138

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Aug 30, 2024

What this PR does

This PR fixes an issue where some annotations would not be returned for sharded queries.

This would occur if the annotation was generated during the evaluation of one of the shards.

For example, the query sum(rate(foo[5m])) should return a metric might not be a counter, name does not end in _total/_sum/_count/_bucket: "foo" info annotation. When this query is sharded, the annotation is generated during the evaluation of one of the sum(rate(foo{__query_shard__="x_of_y"}[5m])) shards on queriers, but the query-frontend would not combine annotations from individual shards into the final result.

This PR changes the behaviour of query-frontends to accumulate and return annotations from each sharded query.

Which issue(s) this PR fixes or relates to

(none)

Checklist

  • Tests updated.
  • [n/a] Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • [n/a] about-versioning.md updated with experimental features.

@charleskorn charleskorn force-pushed the charleskorn/annotations-for-sharded-queries branch from a5233df to f947931 Compare August 30, 2024 03:44
@charleskorn charleskorn marked this pull request as ready for review August 30, 2024 03:47
@charleskorn charleskorn requested a review from a team as a code owner August 30, 2024 03:47
@charleskorn charleskorn merged commit 65c1332 into main Aug 30, 2024
29 checks passed
@charleskorn charleskorn deleted the charleskorn/annotations-for-sharded-queries branch August 30, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants