Skip to content

Commit

Permalink
custom port
Browse files Browse the repository at this point in the history
  • Loading branch information
Utkarsh Shukla committed Dec 26, 2024
1 parent 8c5d5aa commit 6396d54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,18 @@ func runPrometheusHTTPServer(ctx context.Context, port uint16, profile bool) {
mux.Handle("/metrics", promhttp.Handler())
mux.HandleFunc("/", healthcheck)
mux.HandleFunc("/health", healthcheck)
if profile {
// if profile {
logger.Infof("Prometheus handler includes /debug/pprof endpoints")
mux.HandleFunc("/debug/pprof/", pprofhttp.Index)
mux.HandleFunc("/debug/pprof/cmdline", pprofhttp.Cmdline)
mux.HandleFunc("/debug/pprof/profile", pprofhttp.Profile)
mux.HandleFunc("/debug/pprof/symbol", pprofhttp.Symbol)
mux.HandleFunc("/debug/pprof/trace", pprofhttp.Trace)
}
// }

server := &http.Server{
Addr: fmt.Sprintf(":%d", 9102),
// Addr: fmt.Sprintf(":%d", 9102),
Addr: ":9102",
Handler: mux,
}
logger.Fatal(server.ListenAndServe())
Expand Down

0 comments on commit 6396d54

Please sign in to comment.