Skip to content

Commit

Permalink
Move RPC metrics registration after its client's initialization (#3488)
Browse files Browse the repository at this point in the history
Signed-off-by: Yacov Manevich <[email protected]>
  • Loading branch information
yacovm authored Oct 23, 2024
1 parent 44d2178 commit e8f4c99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vms/rpcchainvm/vm_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ func (vm *VMClient) Initialize(
return err
}

if err := chainCtx.Metrics.Register("", vm); err != nil {
return err
}

// Initialize the database
dbServerListener, err := grpcutils.NewListener()
if err != nil {
Expand Down Expand Up @@ -229,6 +225,10 @@ func (vm *VMClient) Initialize(
return err
}

if err := chainCtx.Metrics.Register("", vm); err != nil {
return err
}

id, err := ids.ToID(resp.LastAcceptedId)
if err != nil {
return err
Expand Down

0 comments on commit e8f4c99

Please sign in to comment.