This repository was archived by the owner on Apr 18, 2023. It is now read-only.
This repository was archived by the owner on Apr 18, 2023. It is now read-only.
Metrics not updated automatically #97
Open
Description
ctx, cancel := context.WithCancel(ctx)
defer cancel()
srv := &http.Server{
Addr: config.ServerHost + ":" + config.PromthesiusPort,
Handler: promhttp.HandlerFor(promthesusConfig.Registry, promhttp.HandlerOpts{}),
}
//initializing metrics
promthesusConfig.ServerMetrics.InitializeMetrics(grpcServer)
grpc_prometheus.Register(grpcServer)
// graceful shutdown
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
go func() {
for range c {
// sig is a ^C, handle it
}
_, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
logger.Log.Info("graceful shutting down promthesius Server")
_ = srv.Shutdown(ctx)
}()
when i open a port ..it already intiliased with the default metrics ...but when we hit new request on server ..then the details not updated automatically. After refreshing same problem happens
Metadata
Metadata
Assignees
Labels
No labels