mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-25 02:00:32 +00:00
add peer id to receive
This commit is contained in:
@@ -274,7 +274,7 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
|
||||
Subsystem: MetricsSubsystem,
|
||||
Name: "vote_received",
|
||||
Help: "Number of votes of each type received.",
|
||||
}, append(labels, "vote_type")).With(labelsAndValues...),
|
||||
}, append(labels, "peer_id", "vote_type")).With(labelsAndValues...),
|
||||
PeerVoteCount: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: MetricsSubsystem,
|
||||
|
||||
@@ -234,7 +234,7 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) {
|
||||
}
|
||||
|
||||
if m, ok := e.Message.(*consensus.Vote); ok {
|
||||
conR.Metrics.VoteReceived.With("vote_type", m.Vote.Type.String()).Add(1)
|
||||
conR.Metrics.VoteReceived.With("peer_id", string(e.Src.ID()), "vote_type", m.Vote.Type.String()).Add(1)
|
||||
}
|
||||
m := e.Message
|
||||
if wm, ok := m.(p2p.Wrapper); ok {
|
||||
|
||||
Reference in New Issue
Block a user