feat: Metrics for Prometheus (#309)

* feat: prometheus metrics

* Added Prometheus resources support to helm chart
This commit is contained in:
Dmytro Bondar
2024-09-29 22:10:50 +02:00
committed by GitHub
parent ae1be0e367
commit f22a7e4a2e
19 changed files with 399 additions and 26 deletions

View File

@@ -95,8 +95,6 @@ func NewServer(cfg *config.Config, endpoints ...ApiEndpointSetupFunc) (*Server,
}
func (s *Server) Run(ctx context.Context, listenAddress string) {
logrus.Infof("starting web service on %s", listenAddress)
// Run web service
srv := &http.Server{
Addr: listenAddress,
@@ -116,6 +114,7 @@ func (s *Server) Run(ctx context.Context, listenAddress string) {
cancelFn()
}
}()
logrus.Infof("started web service on %s", listenAddress)
// Wait for the main context to end
<-srvContext.Done()