Browse Source

*: add peer prefix for network metrics between peers

Xiang Li 9 years ago
parent
commit
6af0917812
2 changed files with 11 additions and 11 deletions
  1. 5 5
      Documentation/metrics.md
  2. 6 6
      rafthttp/metrics.go

+ 5 - 5
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
 

+ 6 - 6
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"},