1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

metrics: add go and process collectors (#6704)

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
Mohammed Al Sahaf 2024-11-23 02:38:59 +03:00 committed by GitHub
parent 8c3dd3de70
commit 1d106fa14d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,6 +110,8 @@ func (ctx *Context) GetMetricsRegistry() *prometheus.Registry {
func (ctx *Context) initMetrics() { func (ctx *Context) initMetrics() {
ctx.metricsRegistry.MustRegister( ctx.metricsRegistry.MustRegister(
collectors.NewBuildInfoCollector(), collectors.NewBuildInfoCollector(),
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
collectors.NewGoCollector(),
adminMetrics.requestCount, adminMetrics.requestCount,
adminMetrics.requestErrors, adminMetrics.requestErrors,
globalMetrics.configSuccess, globalMetrics.configSuccess,