celestiaorg / celestiaorg/go-header

fix(p2p): Observe length of peerTracker `tracked` and `disconnected`

Open
#145 0 comments 0 reactions 1 assignee Claimed by @vgonkivs View on GitHub
p2p
Dominant language
Go
Stars
21
Forks
33
Avg merge
5d 20h
Merged PRs (30d)
7

Description

It is easier to understand peerTracker health if we make the observe callback directly look at the length of the map at the time of observation rather than observing the ints that are on the `exchangeMetrics` struct as it's not clear *when* the peerTracker has X many tracked vs disconnected peers.

Let's instead take the length of the maps directly (rlocking of course), but this will make the metric more understandable.

cc @distractedm1nd

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.