package logmower import ( "errors" "fmt" "log" "net/http" "os" "github.com/prometheus/client_golang/prometheus/promhttp" ) const PrometheusPrefix = "logmower" // TODO: func main() { go func() { metricsPort := 2112 log.Printf("serving /metrics on port %d", metricsPort) http.Handle("/metrics", promhttp.Handler()) if err := http.ListenAndServe(fmt.Sprintf(":%d", metricsPort), nil); !errors.Is(err, http.ErrServerClosed) { log.Fatalf("serving /metrics: %e", err) } }() if err := App.Run(os.Args); err != nil { log.Fatal(err) } }