aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMohammed Al Sahaf <[email protected]>2024-11-23 01:07:56 +0300
committerMohammed Al Sahaf <[email protected]>2024-11-23 01:07:56 +0300
commit369e84d65f39d2852d472137d1f6a6d81df5d6cb (patch)
tree31e4e9c7f00eff4d684cfff881f723af212dbe5e
parent8c3dd3de709040d72bd98a756a044c453d7e871e (diff)
downloadcaddy-add-default-collectors.tar.gz
caddy-add-default-collectors.zip
metrics: add `go` and `process` collectorsadd-default-collectors
Signed-off-by: Mohammed Al Sahaf <[email protected]>
-rw-r--r--context.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/context.go b/context.go
index 5965d0c94..d4d7afacf 100644
--- a/context.go
+++ b/context.go
@@ -110,6 +110,8 @@ func (ctx *Context) GetMetricsRegistry() *prometheus.Registry {
func (ctx *Context) initMetrics() {
ctx.metricsRegistry.MustRegister(
collectors.NewBuildInfoCollector(),
+ collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
+ collectors.NewGoCollector(),
adminMetrics.requestCount,
adminMetrics.requestErrors,
globalMetrics.configSuccess,