Skip to content

p2p: add message type into the send/recv bytes metrics (backport #7155)#7161

Merged
tychoish merged 2 commits intov0.35.xfrom
mergify/bp/v0.35.x/pr-7155
Oct 27, 2021
Merged

p2p: add message type into the send/recv bytes metrics (backport #7155)#7161
tychoish merged 2 commits intov0.35.xfrom
mergify/bp/v0.35.x/pr-7155

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Oct 26, 2021

This is an automatic backport of pull request #7155 done by Mergify.
Cherry-pick of b4bc6bb has failed:

On branch mergify/bp/v0.35.x/pr-7155
Your branch is up to date with 'origin/v0.35.x'.

You are currently cherry-picking commit b4bc6bb4e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   internal/p2p/metrics.go
	new file:   internal/p2p/metrics_test.go
	modified:   internal/p2p/router.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   internal/p2p/pqueue.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

This pull request adds a new "mesage_type" label to the send/recv bytes metrics calculated in the p2p code.

Below is a snippet of the updated metrics that includes the updated label:
```
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_HasVote",peer_id="2551a13ed720101b271a5df4816d1e4b3d3bd133"} 652
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_HasVote",peer_id="4b1068420ef739db63377250553562b9a978708a"} 631
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_HasVote",peer_id="927c50a5e508c747830ce3ba64a3f70fdda58ef2"} 631
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_NewRoundStep",peer_id="2551a13ed720101b271a5df4816d1e4b3d3bd133"} 393
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_NewRoundStep",peer_id="4b1068420ef739db63377250553562b9a978708a"} 357
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_NewRoundStep",peer_id="927c50a5e508c747830ce3ba64a3f70fdda58ef2"} 386
```

(cherry picked from commit b4bc6bb)

# Conflicts:
#	internal/p2p/pqueue.go
@williambanfield williambanfield added the S:automerge Automatically merge PR when requirements pass label Oct 26, 2021
@tychoish tychoish merged commit dd1471d into v0.35.x Oct 27, 2021
@tychoish tychoish deleted the mergify/bp/v0.35.x/pr-7155 branch October 27, 2021 11:34
creachadair pushed a commit that referenced this pull request Oct 28, 2021
One of the patched uses in #7161 missed the message type field,
triggering panic failures from Prometheus.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts S:automerge Automatically merge PR when requirements pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants