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 hint for pipeline error to query builder #52134

Merged
merged 8 commits into from Jul 14, 2022

Conversation

ivanahuckova
Copy link
Member

What this PR does / why we need it:
This PR adds hint for when sampled log lines have __error__ label (__error__ label is created in loki when parsing error happens) AND query has exactly 1 parser AND there is no __error__ label filtering.

Which issue(s) this PR fixes:

Part of #51980

Special notes for your reviewer:

To test this, I recommend running tns app:
git clone https://github.com/grafana/tns.git
cd tns/production/docker-compose/
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
docker-compose up -d

And then in grafana run query {compose_project="docker-compose"} in query builder. You might need to temporarily update limit maxLines: 50, in public/app/plugins/datasource/loki/datasource.ts to 100, because of the shape of incoming logs.

hints.mov

@grafanabot
Copy link
Contributor

@ivanahuckova ivanahuckova removed the request for review from a team July 13, 2022 12:25
Copy link
Contributor

@svennergr svennergr left a comment

Choose a reason for hiding this comment

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

Just a few nits but in total LGTM!

public/app/plugins/datasource/loki/addToQuery.ts Outdated Show resolved Hide resolved
public/app/plugins/datasource/loki/queryHints.ts Outdated Show resolved Hide resolved
public/app/plugins/datasource/loki/responseUtils.ts Outdated Show resolved Hide resolved
@grafanabot
Copy link
Contributor

@grafanabot
Copy link
Contributor

@ivanahuckova ivanahuckova merged commit 1d077e8 into main Jul 14, 2022
@ivanahuckova ivanahuckova deleted the ivana/loki-builder-hints-error branch July 14, 2022 08:48
bohandley pushed a commit that referenced this pull request Jul 14, 2022
* WIP

* Update

* Add tests

* Fix lint/betterer errors

* Update public/app/plugins/datasource/loki/addToQuery.ts

* Update copy
@linoman linoman modified the milestone: 9.1.0-beta1 Aug 2, 2022
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.

None yet

5 participants