Check err for view.Register

This commit is contained in:
Marco Munizaga 2022-08-12 09:55:03 -07:00
parent 1f65d51a69
commit 1af9e3c313

View File

@ -111,7 +111,10 @@ func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo)
if err != nil { if err != nil {
return nil, fmt.Errorf("error creating resource manager stats reporter: %w", err) return nil, fmt.Errorf("error creating resource manager stats reporter: %w", err)
} }
view.Register(obs.DefaultViews...) err = view.Register(obs.DefaultViews...)
if err != nil {
return nil, fmt.Errorf("error registering rcmgr metrics: %w", err)
}
// Metrics // Metrics
opts = append(opts, rcmgr.WithMetrics(rcmgrMetrics{}), rcmgr.WithTraceReporter(str)) opts = append(opts, rcmgr.WithMetrics(rcmgrMetrics{}), rcmgr.WithTraceReporter(str))