From 6af09178121e8d8e2fb82ec07c489ce7ec3978f1 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 17 Jun 2016 11:18:49 -0700 Subject: [PATCH] *: add peer prefix for network metrics between peers --- Documentation/metrics.md | 10 +++++----- rafthttp/metrics.go | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/metrics.md b/Documentation/metrics.md index 94184f4b3..18f880b4c 100644 --- a/Documentation/metrics.md +++ b/Documentation/metrics.md @@ -60,13 +60,13 @@ All these metrics are prefixed with `etcd_network_` | Name | Description | Type | |---------------------------|--------------------------------------------------------------------|---------------| -| sent_bytes_total | The total number of bytes sent to the member with ID `TO`. | Counter(To) | -| received_bytes_total | The total number of bytes received from the member with ID `From`. | Counter(From) | -| round_trip_time_seconds | Round-Trip-Time histogram between members. | Histogram(To) | +| peer_sent_bytes_total | The total number of bytes sent to the peer with ID `To`. | Counter(To) | +| peer_received_bytes_total | The total number of bytes received from the peer with ID `From`. | Counter(From) | +| peer_round_trip_time_seconds | Round-Trip-Time histogram between peers. | Histogram(To) | -`sent_bytes_total` counts the total number of bytes sent to a specific member. Usually the leader member sends more data than other members since it is responsible for transmitting replicated data. +`peer_sent_bytes_total` counts the total number of bytes sent to a specific peer. Usually the leader member sends more data than other members since it is responsible for transmitting replicated data. -`received_bytes_total` counts the total number of bytes received from a specific member. Usually follower members receive data only from the leader member. +`peer_received_bytes_total` counts the total number of bytes received from a specific peer. Usually follower members receive data only from the leader member. ### gRPC requests diff --git a/rafthttp/metrics.go b/rafthttp/metrics.go index 67a0bda60..e9550c3bb 100644 --- a/rafthttp/metrics.go +++ b/rafthttp/metrics.go @@ -21,8 +21,8 @@ var ( sentBytes = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "etcd", Subsystem: "network", - Name: "sent_bytes_total", - Help: "The total number of bytes sent.", + Name: "peer_sent_bytes_total", + Help: "The total number of bytes sent to peers.", }, []string{"To"}, ) @@ -30,8 +30,8 @@ var ( receivedBytes = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "etcd", Subsystem: "network", - Name: "received_bytes_total", - Help: "The total number of bytes received.", + Name: "peer_received_bytes_total", + Help: "The total number of bytes received from peers.", }, []string{"From"}, ) @@ -39,8 +39,8 @@ var ( rtts = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "etcd", Subsystem: "network", - Name: "round_trip_time_seconds", - Help: "Round-Trip-Time histogram between members.", + Name: "peer_round_trip_time_seconds", + Help: "Round-Trip-Time histogram between peers.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 14), }, []string{"To"},