prometheus metric 관련 코드 제거

This commit is contained in:
2025-06-26 14:48:05 +09:00
parent cf4a2a3ea5
commit 106aa68529
5 changed files with 73 additions and 393 deletions

View File

@ -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()
}