[#424] morph: Fix cache metrics

Use separate morph cache metrics for node and IR

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-06-14 12:12:47 +03:00
parent 4449006862
commit 26b305f82b
5 changed files with 17 additions and 8 deletions

View file

@ -30,8 +30,6 @@ const (
)
func initMorphComponents(ctx context.Context, c *cfg) {
var err error
addresses := morphconfig.RPCEndpoint(c.appCfg)
// Morph client stable-sorts endpoints by priority. Shuffle here to randomize
@ -50,6 +48,7 @@ func initMorphComponents(ctx context.Context, c *cfg) {
c.internalErr <- errors.New("morph connection has been lost")
}),
client.WithSwitchInterval(morphconfig.SwitchInterval(c.appCfg)),
client.WithMorphCacheMetrics(metrics.NewNodeMorphCacheMetrics()),
)
if err != nil {
c.log.Info(logs.FrostFSNodeFailedToCreateNeoRPCClient,