-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Each Peer has an MConnection which multiplexes reactor channel communication. For debugging the progress of the various subsystems it would be helpful to monitor when each channel last sent/received messages.
The peer currently exposes sending/receiving telemetry but it doesn't include a Channel specific label.
Receiving:
Lines 249 to 253 in 4253e67
| res := p.mconn.Send(chID, msgBytes) | |
| if res { | |
| p.metrics.PeerSendBytesTotal.With("peer_id", string(p.ID())).Add(float64(len(msgBytes))) | |
| } | |
| return res |
Sending:
Lines 365 to 373 in 4253e67
| onReceive := func(chID byte, msgBytes []byte) { | |
| reactor := reactorsByCh[chID] | |
| if reactor == nil { | |
| // Note that its ok to panic here as it's caught in the conn._recover, | |
| // which does onPeerError. | |
| panic(fmt.Sprintf("Unknown channel %X", chID)) | |
| } | |
| p.metrics.PeerReceiveBytesTotal.With("peer_id", string(p.ID())).Add(float64(len(msgBytes))) | |
| reactor.Receive(chID, p, msgBytes) |
The goal then is to add a label to these metrics to allow channel specific observations.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels