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

logs: download-logs/download-csv buttons have different behavior #53742

Open
gabor opened this issue Aug 15, 2022 · 4 comments
Open

logs: download-logs/download-csv buttons have different behavior #53742

gabor opened this issue Aug 15, 2022 · 4 comments
Labels
area/logs area/ux stale Issue with no recent activity

Comments

@gabor
Copy link
Contributor

gabor commented Aug 15, 2022

if you have logs-data in explore, where the data is contained in multiple dataframes (for example, Loki in grafana8.x),
and go to download the csv or the logs, you get this screen:
export

(the {place="luna", source="data"} part is the dataframe-name, and can be changed by opening the Data options section)

in this case, the data is in two dataframes.

  • if you click [Download CSV], you get only data from the chosen dataframe
  • if you click [Download logs], you get all the data, from all the dataframes

this is confusing to the user, because the visualization implies the download-logs also only gets the single dataframe.

i'm not sure what the best way to handle this problem is.

NOTE: starting with grafana9, Loki uses a single-dataframe for logs always, so it's not possible to reproduce the problem there.

( originally reported in #53479 )

@gabor gabor added the prio/medium Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Aug 17, 2022
@matyax
Copy link
Contributor

matyax commented Oct 21, 2022

We should make it more clear what's the difference between both buttons @grafana/observability-logs

"Download logs" downloads everything and it's not related with the selected data frames in data options. We should consider renaming the button or someting similar.

Any suggestions maybe @grafana/docs-squad ?

@gguillotte-grafana
Copy link
Contributor

@matyax It's unclear whether this behavior (one button retrieving only the inspected data frame, the other retrieving all data frames) is expected.

IMO either:

  • both buttons should apply to only the selected data frame
    • but if we limit the "Download logs" functionality across data sources, then how does a user download all logs across all data frames?
  • if they can't both apply to the data frame, then the "Download logs" buttons should have conditional text that communicates the scope, such as "Download all logs" vs. "Download frame logs" with Loki in Grafana 9
    • but if we conditionally change the text, then how do we/should we communicate why the context changes the functionality?
  • if they can't have conditional text, then the "Download logs" button shouldn't be visually associated with one selected data frame in the Inspector
    • but if we move it to a broader visual context, then how does a user download logs for only the selected data frame, and how do we handle Loki?

Otherwise, the hackiest idea I've got for differentiating the buttons' behaviors is via tooltips that provide this context, like:

Download query results for this data frame as comma-separated values

vs.

Download log results for all available data frames as plain text

But that's a kludge - it doesn't make the behavior less confusing, it just explains the confusion closer to the user than the docs.

In any case we still also need to document the different behaviors and contexts for 8.5 to 9.2, and then any changes to those behaviors in 9.3 (#55163), because the current docs don't describe the expected results at all:

Download raw query results as CSV

Grafana generates a CSV file in your default browser download location. You can open it in the viewer of your choice.

  • In the Inspector tab, raw query results following instructions in Inspect raw query results.
  • Refine query settings until you can see the raw data that you want to export.
  • Click Download CSV.

In order to download a CSV file specifically formatted for Excel, expand Data options and then enable the Download for Excel toggle before you click the Download CSV option.

Download log results as TXT

Grafana generates a TXT file in your default browser download location. You can open it in the viewer of your choice.

  • Open the inspector.
  • Inspect the log query results as described above.
  • Click Download logs.

@matyax
Copy link
Contributor

matyax commented Oct 24, 2022

Thank you @gguillotte-grafana !

FYI @grafana/observability-logs

@gabor gabor removed their assignment Nov 8, 2022
@gabor gabor removed the prio/medium Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Apr 19, 2023
Copy link
Contributor

This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

@github-actions github-actions bot added the stale Issue with no recent activity label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logs area/ux stale Issue with no recent activity
Projects
None yet
Development

No branches or pull requests

3 participants