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

add option to disable compression to echoprometheus #97

Merged
merged 2 commits into from Jun 26, 2023

Conversation

fraidev
Copy link
Contributor

@fraidev fraidev commented Jun 20, 2023

I already have GZIP middleware set up for all routes, then it's compressing twice for me.

@aldas
Copy link
Contributor

aldas commented Jun 21, 2023

I think compression should be disabled by default and enabled by adding .Use(middleware.Gzip()) to that route explicitly (would be more intuitive from Echo side).

so

h := promhttp.HandlerFor(config.Gatherer, promhttp.HandlerOpts{DisableCompression: true})

would be fine.

@fraidev
Copy link
Contributor Author

fraidev commented Jun 25, 2023

I think compression should be disabled by default and enabled by adding .Use(middleware.Gzip()) to that route explicitly (would be more intuitive from Echo side).

so

h := promhttp.HandlerFor(config.Gatherer, promhttp.HandlerOpts{DisableCompression: true})

would be fine.

Make sense! I added a new commit.

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (1b74ff7) 63.77% compared to head (3dd0ae7) 63.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #97   +/-   ##
=======================================
  Coverage   63.77%   63.77%           
=======================================
  Files           9        9           
  Lines         944      944           
=======================================
  Hits          602      602           
  Misses        302      302           
  Partials       40       40           
Impacted Files Coverage Δ
echoprometheus/prometheus.go 77.16% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aldas aldas merged commit db8911a into labstack:master Jun 26, 2023
12 checks passed
@aldas
Copy link
Contributor

aldas commented Jun 26, 2023

@fraidev merged, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants