mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-14 06:51:15 +00:00
feat: Metrics for Prometheus (#309)
* feat: prometheus metrics * Added Prometheus resources support to helm chart
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user