diff options
author | 2024-08-25 13:25:32 +0200 | |
---|---|---|
committer | 2024-08-25 13:25:32 +0200 | |
commit | d3887bf6cc180118be9fc8a031cc3aefbfbeb668 (patch) | |
tree | 122180a5289e99c0f92d5e998aaf182d210a700f /internal/api/metrics/metrics.go | |
parent | [bugfix] Carry-over `ApprovedByURI` to avoid marking already-approved remote ... (diff) | |
download | gotosocial-d3887bf6cc180118be9fc8a031cc3aefbfbeb668.tar.xz |
[bugfix] Let prometheus client do its own compression handling (#3232)
Diffstat (limited to 'internal/api/metrics/metrics.go')
-rw-r--r-- | internal/api/metrics/metrics.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/api/metrics/metrics.go b/internal/api/metrics/metrics.go index d89e56ad5..af774d5e8 100644 --- a/internal/api/metrics/metrics.go +++ b/internal/api/metrics/metrics.go @@ -30,9 +30,13 @@ type Module struct { } func New() *Module { - // Use our own gzip handler. + // Let prometheus use "identity", ie., no compression, + // or "gzip", to match our own gzip compression middleware. opts := promhttp.HandlerOpts{ - DisableCompression: true, + OfferedCompressions: []promhttp.Compression{ + promhttp.Identity, + promhttp.Gzip, + }, } // Instrument handler itself. |