Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Remove unbound labels from added custom tendermint metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
v-homsi committed Nov 14, 2022
1 parent 4837b8b commit 9ab498a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions x/evm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t

labels := []metrics.Label{
telemetry.NewLabel("tx_type", fmt.Sprintf("%d", tx.Type())),
telemetry.NewLabel("from", sender),
}
if tx.To() == nil {
labels = []metrics.Label{telemetry.NewLabel("execution", "create")}
labels = append(labels, telemetry.NewLabel("execution", "create"))
} else {
labels = []metrics.Label{
telemetry.NewLabel("execution", "call"),
telemetry.NewLabel("to", tx.To().Hex()), // recipient address (contract or account)
}
labels = append(labels, telemetry.NewLabel("execution", "call"))
}

response, err := k.ApplyTransaction(ctx, tx)
Expand Down

0 comments on commit 9ab498a

Please sign in to comment.