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 (#1434)
Browse files Browse the repository at this point in the history
* Remove unbound labels from added custom tendermint metrics

* Add entry to changelog
  • Loading branch information
v-homsi authored Nov 20, 2022
1 parent f70dafd commit 391cfa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (rpc) [#1431](https://github.com/evmos/ethermint/pull/1431) Align hex-strings proof fields in `eth_getProof` as Ethereum.
* (proto) [#1466](https://github.com/evmos/ethermint/pull/1466) Fix proto scripts and upgrade them to mirror current cosmos-sdk scripts
* (rpc) [#1405](https://github.com/evmos/ethermint/pull/1405) Fix uninitialized chain ID field in gRPC requests.
* (analytics) [#1434](https://github.com/evmos/ethermint/pull/1434) Remove unbound labels from custom tendermint metrics.

## [v0.19.3] - 2022-10-14

Expand Down
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 391cfa9

Please sign in to comment.