Skip to content

Commit c0cced2

Browse files
authored
[proxy] enable metrics for Caddy (#19877)
* [proxy] enable metrics for Caddy Presently we're only getting metrics for caddy_reverse_proxy_upstreams_healthy * Exclude 502 from /_supervisor
1 parent 7b3ecc4 commit c0cced2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

components/proxy/conf/Caddyfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,18 @@
2222

2323
servers {
2424
protocols h1 h2 h2c
25+
metrics
2526
}
2627
}
2728

29+
# Define a matcher to exclude 502 errors on a specific path
30+
@exclude502 {
31+
not {
32+
path /_supervisor*
33+
status 502
34+
}
35+
}
36+
2837
(compression) {
2938
encode zstd gzip
3039
}
@@ -142,7 +151,7 @@
142151

143152
# TODO: refactor once we can listen only in localhost
144153
:9545 {
145-
metrics /metrics {
154+
metrics /metrics @exclude502 {
146155
disable_openmetrics
147156
}
148157
}

0 commit comments

Comments
 (0)