p2p: Per channel metrics (#3666) (#3677)

* Add `chID` label to sent/receive byte mtrics
* add changelog pending entry
This commit is contained in:
Sean Braithwaite
2019-06-05 11:22:00 +02:00
committed by Alexander Simmerl
parent 2a23eca368
commit c9ef824ddf
4 changed files with 46 additions and 33 deletions

View File

@ -47,13 +47,13 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
Subsystem: MetricsSubsystem,
Name: "peer_receive_bytes_total",
Help: "Number of bytes received from a given peer.",
}, append(labels, "peer_id")).With(labelsAndValues...),
}, append(labels, "peer_id", "chID")).With(labelsAndValues...),
PeerSendBytesTotal: prometheus.NewCounterFrom(stdprometheus.CounterOpts{
Namespace: namespace,
Subsystem: MetricsSubsystem,
Name: "peer_send_bytes_total",
Help: "Number of bytes sent to a given peer.",
}, append(labels, "peer_id")).With(labelsAndValues...),
}, append(labels, "peer_id", "chID")).With(labelsAndValues...),
PeerPendingSendBytes: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{
Namespace: namespace,
Subsystem: MetricsSubsystem,