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

Loki: Add support for distinct operation in autocomplete and query builder #69003

Merged
merged 9 commits into from May 25, 2023

Conversation

matyax
Copy link
Contributor

@matyax matyax commented May 24, 2023

In grafana/loki#8662 the DISTINCT filter was introduced, so we are adding support for it in both Code Editor and Query Builder.

  • Automatically closes linked issue when the Pull Request is merged.

Fixes #68170

Special notes for your reviewer:

Added support for autocomplete with no previous labels:

Autocomplete 1

Added support for autocomplete with selected labels:
Autocomplete 2

Added query builder support:
Query Builder

@matyax matyax requested a review from a team as a code owner May 24, 2023 15:36
@matyax matyax added add to changelog no-backport Skip backport of PR labels May 24, 2023
@matyax matyax added this to the 10.1.x milestone May 24, 2023
@github-actions
Copy link
Contributor

Backend code coverage report for PR #69003
No changes

@github-actions
Copy link
Contributor

Frontend code coverage report for PR #69003

Plugin Main PR Difference
loki 84.76% 84.86% .10%

Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

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

Great job! I love that you added label suggestion as well.

@ivanahuckova ivanahuckova changed the title Logs: Added support for Loki distinct operation in autocomplete and query builder Loki: Add support for distinct operation in autocomplete and query builder May 25, 2023
@matyax matyax merged commit 9abf814 into main May 25, 2023
23 checks passed
@matyax matyax deleted the matyax/loki-distinct-support branch May 25, 2023 12:22
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
@xkkker
Copy link

xkkker commented Aug 17, 2023

Hi, I use the docker image grafana/grafana:main to run a grafana, it seems had distinct support but report a error like syntax error: unexpected IDENTIFIER, any ideas? My loki version is v2.8.4. Thanks~

@svennergr
Copy link
Contributor

Hi, I use the docker image grafana/grafana:main to run a grafana, it seems had distinct support but report a error like syntax error: unexpected IDENTIFIER, any ideas? My loki version is v2.8.4. Thanks~

Hey @xkkker,
please note that the distinct operation has not been released with an official Loki version yet. However I think you should have it if you run Loki from the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loki: Implement "distinct" operation
6 participants