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

Pass query hints down into remote read query proto #4122

Merged
merged 2 commits into from
May 8, 2018
Merged

Pass query hints down into remote read query proto #4122

merged 2 commits into from
May 8, 2018

Conversation

henridf
Copy link
Contributor

@henridf henridf commented Apr 30, 2018

Completes #2580

This currently doesn't include tests, but I'd gladly add some if there are suggestions on how/where to do this.

Signed-off-by: Henri DF <henridf@gmail.com>
@@ -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;
Copy link
Contributor

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

Copy link
Contributor Author

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)

@@ -49,3 +49,8 @@ message LabelMatcher {
string name = 2;
string value = 3;
}

message ReadParams {
int64 step = 1;
Copy link
Contributor

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

Copy link
Contributor Author

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.
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlekSi string vs enum was discussed at #2580, this PR follows that

@AlekSi
Copy link
Contributor

AlekSi commented May 6, 2018

I looked into Prometheus code, and it is not clear to me if those hints can be ignored by remote storage. Can they?

@henridf
Copy link
Contributor Author

henridf commented May 7, 2018

@brian-brazil i addressed your comments, anything further needed to merge this PR?

@brian-brazil brian-brazil merged commit 2952387 into prometheus:master May 8, 2018
@brian-brazil
Copy link
Contributor

Thanks!

@jiacai2050
Copy link

@henridf @AlekSi I still have no idea if hints can be ignored by remote storage. Can they?

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.

4 participants