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

Explore: Prevent empty Elasticsearch logs query responses from hiding the logs panel #40217

Merged
merged 2 commits into from
Oct 12, 2021

Conversation

Elfo404
Copy link
Contributor

@Elfo404 Elfo404 commented Oct 8, 2021

What this PR does / why we need it:
When issuing logs queries, it may happen that for a given time range there are no entries. Instead of returning nothing, we should return an empty series to prevent the logs panel from disappearing in explore, especially when using logs pagination since it would force users to manually change the time range from the topo-level time picker.

Which issue(s) this PR fixes:

Fixes #38679

Special notes for your reviewer:

@Elfo404 Elfo404 added this to the 8.2.1 milestone Oct 8, 2021
@Elfo404 Elfo404 force-pushed the gio/fix/empty-log-response branch from e072dad to 8c2cf45 Compare October 8, 2021 14:35
@Elfo404 Elfo404 marked this pull request as ready for review October 8, 2021 14:36
@Elfo404 Elfo404 requested review from a team, davkal, gabor and ivanahuckova and removed request for a team October 8, 2021 14:36
@hugohaggmark hugohaggmark modified the milestones: 8.2.1, 8.2.2 Oct 11, 2021
@Elfo404 Elfo404 force-pushed the gio/fix/empty-log-response branch from 8c2cf45 to f8cdb22 Compare October 11, 2021 11:16
Copy link
Contributor

@gabor gabor left a comment

Choose a reason for hiding this comment

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

LGTM!

@Elfo404 Elfo404 added the old backport v8.2.x Mark PR for automatic backport to v8.2.x label Oct 12, 2021
@Elfo404 Elfo404 changed the title Elasticsearch: send empty series when no data is received for a log query Explore: Prevent empty Elasticsearch logs query respoonses from hiding the logs panel Oct 12, 2021
@Elfo404 Elfo404 changed the title Explore: Prevent empty Elasticsearch logs query respoonses from hiding the logs panel Explore: Prevent empty Elasticsearch logs query responses from hiding the logs panel Oct 12, 2021
@Elfo404 Elfo404 merged commit b0391d4 into main Oct 12, 2021
@Elfo404 Elfo404 deleted the gio/fix/empty-log-response branch October 12, 2021 12:59
grafanabot pushed a commit that referenced this pull request Oct 12, 2021
… the logs panel (#40217)

* remove return value from addPreferredVisualisationType

* Elasticsearch: send empty series instead when no data is received for a query

(cherry picked from commit b0391d4)
Elfo404 added a commit that referenced this pull request Oct 12, 2021
… the logs panel (#40217) (#40329)

* remove return value from addPreferredVisualisationType

* Elasticsearch: send empty series instead when no data is received for a query

(cherry picked from commit b0391d4)

Co-authored-by: Giordano Ricci <[email protected]>
@chri2547 chri2547 changed the title Explore: Prevent empty Elasticsearch logs query responses from hiding the logs panel Explore: We fixed the problem where the Explore log panel disappears when an Elasticsearch logs query returns no results. Oct 20, 2021
@osg-grafana osg-grafana changed the title Explore: We fixed the problem where the Explore log panel disappears when an Elasticsearch logs query returns no results. Explore: Prevent empty Elasticsearch logs query responses from hiding the logs panel Nov 4, 2021
@osg-grafana
Copy link
Contributor

Reverted change to PR title to conform to style.

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.

Logs navigation: Show more log results clears page
5 participants