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 gzip
compression to resource calls
#59059
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes looks good. Just wanted to leave a note that I'm trying to get more involved in go code.
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/42698 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/42820 |
Loki: Add `gzip` compression to resource calls (grafana#59059) * Loki: Add compression to `callResource` * add missing tests * fix formatting (cherry picked from commit 08e87a2) Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
What is this feature?
Loki returns gzip compressed responses in certain situations. This PR enables this compression in the Loki datasource.
Why do we need this feature?
Improved performance if e.g. label values get large.
Special notes for your reviewer:
To get Loki into a setup where compression is enabled:
This enables compression on responses which are larger than 1400 bytes.
2. Create a bunch of labels to get more than 1400 bytes by changing the https://github.com/grafana/grafana/blob/main/devenv/docker/blocks/loki/data/data.js file. E.g. change the
main
method to:make devenv sources=loki