forked from TrueCloudLab/frostfs-node
[#xx] Create innerring metrics before metrics usage
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
4476a1dbaf
commit
f7c4c07453
1 changed files with 4 additions and 3 deletions
|
@ -326,7 +326,10 @@ func (s *Server) registerStarter(f func() error) {
|
|||
// New creates instance of inner ring sever structure.
|
||||
func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan<- error) (*Server, error) {
|
||||
var err error
|
||||
server := &Server{log: log}
|
||||
server := &Server{
|
||||
log: log,
|
||||
metrics: metrics.NewInnerRingMetrics(),
|
||||
}
|
||||
|
||||
server.setHealthStatus(control.HealthStatus_HEALTH_STATUS_UNDEFINED)
|
||||
|
||||
|
@ -393,8 +396,6 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
|
|||
return nil, err
|
||||
}
|
||||
|
||||
server.metrics = metrics.NewInnerRingMetrics()
|
||||
|
||||
return server, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue