-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Pass query hints down into remote read query proto #4122
Pass query hints down into remote read query proto #4122
Conversation
Signed-off-by: Henri DF <henridf@gmail.com>
prompb/remote.proto
Outdated
@@ -35,6 +35,7 @@ message Query { | |||
int64 start_timestamp_ms = 1; | |||
int64 end_timestamp_ms = 2; | |||
repeated prometheus.LabelMatcher matchers = 3; | |||
prometheus.ReadParams params = 4; |
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.
Hints would be clearer than params I think
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.
I modeled this on SelectParams
, but I agree that Hints is clearer; changed.
(we should maybe also rename SelectParams
-> SelectHints
)
prompb/types.proto
Outdated
@@ -49,3 +49,8 @@ message LabelMatcher { | |||
string name = 2; | |||
string value = 3; | |||
} | |||
|
|||
message ReadParams { | |||
int64 step = 1; |
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.
You should mention the unit here
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
Signed-off-by: Henri DF <henridf@gmail.com>
|
||
message ReadHints { | ||
int64 step_ms = 1; // Query step size in milliseconds. | ||
string func = 2; // String representation of surrounding function or aggregation. |
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.
Could it be any function? Or we should limit it to some small set common for remote storages? Maybe enum will be better?
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.
It's only a hint, and it can be any function.
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.
I looked into Prometheus code, and it is not clear to me if those hints can be ignored by remote storage. Can they? |
@brian-brazil i addressed your comments, anything further needed to merge this PR? |
Thanks! |
Signed-off-by: Henri DF <henridf@gmail.com>
Completes #2580
This currently doesn't include tests, but I'd gladly add some if there are suggestions on how/where to do this.