Skip to content

Commit a9c989d

Browse files
committed
feat: Disabling gzip compression for prometheus
Signed-off-by: Vincent Boutour <[email protected]>
1 parent 32e5ce8 commit a9c989d

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

.github/dependabot.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
version: 2
22
updates:
3-
- package-ecosystem: gomod
4-
directory: /
5-
schedule:
6-
interval: weekly
7-
day: sunday
8-
commit-message:
9-
prefix: chore
10-
include: scope
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: saturday
8+
commit-message:
9+
prefix: chore
10+
include: scope

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,21 @@ Usage of api:
6969
-okStatus int
7070
[http] Healthy HTTP Status code {API_OK_STATUS} (default 204)
7171
-port uint
72-
[server] Listen port {API_PORT} (default 1080)
72+
[server] Listen port (0 to disable) {API_PORT} (default 1080)
7373
-prometheusAddress string
7474
[prometheus] Listen address {API_PROMETHEUS_ADDRESS}
7575
-prometheusCert string
7676
[prometheus] Certificate file {API_PROMETHEUS_CERT}
77+
-prometheusGzip
78+
[prometheus] Enable gzip compression of metrics output {API_PROMETHEUS_GZIP}
7779
-prometheusIdleTimeout string
7880
[prometheus] Idle Timeout {API_PROMETHEUS_IDLE_TIMEOUT} (default "10s")
7981
-prometheusIgnore string
8082
[prometheus] Ignored path prefixes for metrics, comma separated {API_PROMETHEUS_IGNORE}
8183
-prometheusKey string
8284
[prometheus] Key file {API_PROMETHEUS_KEY}
8385
-prometheusPort uint
84-
[prometheus] Listen port {API_PROMETHEUS_PORT} (default 9090)
86+
[prometheus] Listen port (0 to disable) {API_PROMETHEUS_PORT} (default 9090)
8587
-prometheusReadTimeout string
8688
[prometheus] Read Timeout {API_PROMETHEUS_READ_TIMEOUT} (default "5s")
8789
-prometheusShutdownTimeout string

cmd/goweb/api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636

3737
alcotestConfig := alcotest.Flags(fs, "")
3838
loggerConfig := logger.Flags(fs, "logger")
39-
prometheusConfig := prometheus.Flags(fs, "prometheus")
39+
prometheusConfig := prometheus.Flags(fs, "prometheus", flags.NewOverride("Gzip", false))
4040
owaspConfig := owasp.Flags(fs, "")
4141
corsConfig := cors.Flags(fs, "cors")
4242

0 commit comments

Comments
 (0)