-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
Loki: Add optional stream selector to fetchLabelValues API #77207
Conversation
Backend code coverage report for PR #77207 |
Frontend code coverage report for PR #77207
|
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.
Just a nit, rest LGTM!
public/app/plugins/datasource/loki/docs/app_plugin_developer_documentation.md
Show resolved
Hide resolved
…ocumentation.md Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
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.
Looks good, though I noticed a few of the tests don't seem to be testing the new logic. We're either missing the correct assertions or they're not necessary.
…7207) * Loki: Add optional stream selector to fetchLabelValues API * Update public/app/plugins/datasource/loki/docs/app_plugin_developer_documentation.md Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com> * Update tests --------- Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
In this PR, we are adding optional options to
fetchLabelValues
with possibility to specifystreamSelector
. The API for fetching label values includes options to addquery
which is basicallystreamSelector
(I decided to name parameterstreamSelector
causequery
is vague and we can't include things like parsers or other operations) https://grafana.com/docs/loki/latest/reference/api/#list-label-values-within-a-range-of-timeThe reason why we are creating
options
rather than just passingstreamSelector
as second parameter is because in the future we could expand this to other things, such as specifying customtimeRange
or something else.This was requested by @trevorwhitney to help them develop app plugin.