summaryrefslogtreecommitdiff
path: root/internal/api/metrics
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-08-25 13:25:32 +0200
committerLibravatar GitHub <noreply@github.com>2024-08-25 13:25:32 +0200
commitd3887bf6cc180118be9fc8a031cc3aefbfbeb668 (patch)
tree122180a5289e99c0f92d5e998aaf182d210a700f /internal/api/metrics
parent[bugfix] Carry-over `ApprovedByURI` to avoid marking already-approved remote ... (diff)
downloadgotosocial-d3887bf6cc180118be9fc8a031cc3aefbfbeb668.tar.xz
[bugfix] Let prometheus client do its own compression handling (#3232)
Diffstat (limited to 'internal/api/metrics')
-rw-r--r--internal/api/metrics/metrics.go8
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.