mirror of
https://github.com/fatedier/frp.git
synced 2026-10-21 02:23:33 +08:00
feat(client): serve Go runtime metrics on metricsServer (#5579)
Add pkg/metrics/text, a small Prometheus text-format writer, and use it for frpc's /metrics. The endpoint lives only on metricsServer and is covered by its Basic Auth, like the other endpoints there. The package emits the Go runtime families and, on Linux, the process families read from /proc. Their names, types and help strings match client_golang's default collectors, so existing Go runtime dashboards keep working. It deliberately emits no frp_ business metrics and none of client_golang's promhttp_ handler metrics. Writing the subset ourselves keeps client_golang and protobuf out of the frpc binary; both are still used by frps and by the tests here.
This commit is contained in:
@@ -83,7 +83,8 @@ webServer.password = "admin"
|
||||
# Enable golang pprof handlers in admin listener.
|
||||
webServer.pprofEnable = false
|
||||
|
||||
# Separate health and optional profiling listener. frpc does not serve /metrics.
|
||||
# Separate health, metrics and optional profiling listener.
|
||||
# /metrics serves Go runtime metrics only (no proxy or traffic data).
|
||||
# Port 0 disables it. The default address only accepts local connections.
|
||||
metricsServer.addr = "127.0.0.1"
|
||||
metricsServer.port = 0
|
||||
|
||||
Reference in New Issue
Block a user