Phase 9: Documenting #10
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue