Phase 9: Documenting #10

Merged
krendelhoff merged 7 commits from phase-9-documenting into master 2025-08-23 14:35:27 +03:00
Showing only changes of commit 2d8a7fae61 - Show all commits

View file

@ -18,6 +18,8 @@ import (
"hash-of-wisdom/internal/service"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus"
_ "net/http/pprof"
)
@ -64,6 +66,10 @@ func main() {
},
}
// Register Go runtime metrics
prometheus.MustRegister(collectors.NewGoCollector())
prometheus.MustRegister(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}))
// Start metrics and pprof HTTP server
go func() {
http.Handle("/metrics", promhttp.Handler())