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

Dashboard view different than the Explore view when using "Add to Dashboard" option with Loki Datasource #63929

Closed
piettes opened this issue Mar 1, 2023 · 2 comments
Labels

Comments

@piettes
Copy link

piettes commented Mar 1, 2023

What happened:

I am trying to set up some dashboard for my log monitoring.
When I go to “Explore”, I can really easily do exactly what I want:

de1bcef781200a98aaa7cc914023a5caeda34cc4_2_1380x712

So basically a nice bar graph with the log level with different color.
There are also the list of logs in the bottom.

However, when I save this view with “Add to Dashboard”, the same panel in the dashboard view looks different:

f937f53a662aa600266df05d8115763433ecd3dd_2_1380x380

Now I only have the list of logs, no graph. The graph should also be there.

What you expected to happen:

When we save a panel from the the Explore feature, the dashboard should have the same view (with the graph)

How to reproduce it (as minimally and precisely as possible):

Explore > Data Source: Loki > extract some logs (example {name="backend"} |= | json | __error__=) > add to dashboard

Anything else we need to know?:
Here is the original question on the community forum:
https://community.grafana.com/t/panel-view-with-explore-not-the-same-when-added-to-dashboard/82864

Environment:

  • Grafana version: 9.2.5
  • Data source type & version: Loki
  • OS Grafana is installed on:
  • User OS & Browser: Macos, Firefox
  • Grafana plugins:
  • Others:
@usmangt
Copy link
Contributor

usmangt commented Mar 1, 2023

I was also able to reproduce this case on Grafana version 9.4.1

To me, it looks like a bug because this only happens in the Loki Datasource while in the case of Prometheus datasource (inside Explore view) which uses TimeSeries Panel as default, the “Add to Dashboard” does work correctly.

@usmangt usmangt added the triage/needs-confirmation used for OSS triage rotation - reported issue needs to be reproduced label Mar 1, 2023
@usmangt usmangt changed the title Dashboard view different than the Explore view when important with Loki Dashboard view different than the Explore view when using "Add to Dashboard" option with Loki Datasource Mar 1, 2023
@Elfo404
Copy link
Member

Elfo404 commented Mar 1, 2023

Dashboards and explore are different by definition. The "Add to Dashboard" button does not copy the whole Explore state to a dashboard, but rather the queries you explicitly have set in Explore (and more precisely, only non-hidden ones) into a single panel inside a dashboard and picks a default visualization based on the current result set. In this case, it uses the logs panel.

The logs volume histogram is additional information we display in Explore (it doesn't use the same query, and datasources have to implement different APIs for it to be supported in Explore in the first place) because of the use case it serves.

Exactly te same happens when adding some prometheus query: in Explore we show both a timeseries graph and a table with the results, but we only add a timeseries panel to the dashboard.

Given this is working as intended, i'm going to close this issue, but those are all valid (and appreciated) suggestions. may i ask you to start a discussion in https://github.com/grafana/grafana/discussions/categories/explore ? we are also considering some other improvements for the future to the whole Explore to Dashboard experience, and any idea would be extremely valuable.

@Elfo404 Elfo404 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants