prometheus metric 관련 코드 제거
This commit is contained in:
@ -3,15 +3,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"repositories.action2quare.com/ayo/gocommon/flagx"
|
||||
"repositories.action2quare.com/ayo/gocommon/logger"
|
||||
"repositories.action2quare.com/ayo/houston/client"
|
||||
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -22,23 +15,5 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
http.Handle("/metrics", promhttp.Handler())
|
||||
server := &http.Server{Addr: ":9200", Handler: nil}
|
||||
go func() {
|
||||
defer func() {
|
||||
logger.Println("metric server shutdown")
|
||||
r := recover()
|
||||
if r != nil {
|
||||
logger.Println(r)
|
||||
}
|
||||
}()
|
||||
server.ListenAndServe()
|
||||
|
||||
}()
|
||||
|
||||
hc.Start()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
|
||||
server.Shutdown(ctx)
|
||||
cancel()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user