Skip to content

querier: Add a flag to limit time range for metadata APIs (Labels and Series)#3147

Merged
kakkoyun merged 7 commits intothanos-io:masterfrom
kakkoyun:limit_label_apis
Sep 21, 2020
Merged

querier: Add a flag to limit time range for metadata APIs (Labels and Series)#3147
kakkoyun merged 7 commits intothanos-io:masterfrom
kakkoyun:limit_label_apis

Conversation

@kakkoyun
Copy link
Member

@kakkoyun kakkoyun commented Sep 9, 2020

Signed-off-by: Kemal Akkoyun kakkoyun@gmail.com

WIP

Ref #3119
Fixes #1811

Changes

  • Add query.metadata.default-time-range flag to specify the default look-back duration for retrieving labels through Labels APIs when time range parameters are not specified.

Verification

  • make test-local

@kakkoyun kakkoyun marked this pull request as draft September 9, 2020 15:57
@kakkoyun kakkoyun force-pushed the limit_label_apis branch 3 times, most recently from f84bd95 to c751c96 Compare September 17, 2020 16:00
@kakkoyun kakkoyun changed the title [WIP]: Limit time window for label APIs by default Limit time window for label APIs by default Sep 17, 2020
@kakkoyun kakkoyun changed the title Limit time window for label APIs by default querier: Add a flag to limit time range for label APIs Sep 17, 2020
@kakkoyun kakkoyun requested review from bwplotka and yeya24 September 17, 2020 16:02
@kakkoyun kakkoyun marked this pull request as ready for review September 17, 2020 16:03
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Looks perfect!

Copy link
Member

@onprem onprem left a comment

Choose a reason for hiding this comment

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

LGTM!

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@kakkoyun
Copy link
Member Author

friendly ping @bwplotka

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Amazing, thanks! Some suggestion, otherwise LGTM 👍

@kakkoyun kakkoyun changed the title querier: Add a flag to limit time range for label APIs querier: Add a flag to limit time range for metadata APIs (Labels and Series) Sep 21, 2020
Implement time ranges for series API

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@kakkoyun kakkoyun requested review from bwplotka and yeya24 September 21, 2020 14:45
@kakkoyun
Copy link
Member Author

@bwplotka Addressed the raised issues and included series API time range as well.

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM, 👍

Thanks! 💪

I think it would be amazing to actually propose changing the default for this being ~1d or something in next release (:

@kakkoyun kakkoyun merged commit 68d0ad2 into thanos-io:master Sep 21, 2020
@kakkoyun kakkoyun deleted the limit_label_apis branch September 21, 2020 15:59
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.

querier: Limit LabelNames; LabelValues to certain time period.

4 participants