19 lines
381 B
Go
19 lines
381 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
_ "net/http/pprof"
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"github.com/povilasv/prommod"
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
_ "golang.org/x/net/trace"
|
|
)
|
|
|
|
func init() {
|
|
http.Handle("/metrics", promhttp.Handler())
|
|
prometheus.Register(prommod.NewCollector(filepath.Base(os.Args[0])))
|
|
}
|