diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-01-18 22:22:07 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | cdef7af87f6ff7c7f39b3e2af157970ff795eb84 (patch) | |
tree | 5e8f6806efc6dc57cca45eb6c21f02d77d1eb853 /p2p/metrics.go | |
parent | feb650d1a0567c714b14c83a192de551aeb1dcf4 (diff) | |
download | dexon-cdef7af87f6ff7c7f39b3e2af157970ff795eb84.tar dexon-cdef7af87f6ff7c7f39b3e2af157970ff795eb84.tar.gz dexon-cdef7af87f6ff7c7f39b3e2af157970ff795eb84.tar.bz2 dexon-cdef7af87f6ff7c7f39b3e2af157970ff795eb84.tar.lz dexon-cdef7af87f6ff7c7f39b3e2af157970ff795eb84.tar.xz dexon-cdef7af87f6ff7c7f39b3e2af157970ff795eb84.tar.zst dexon-cdef7af87f6ff7c7f39b3e2af157970ff795eb84.zip |
p2p: report latency and relative latency to datadog (#162)
Diffstat (limited to 'p2p/metrics.go')
-rw-r--r-- | p2p/metrics.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/p2p/metrics.go b/p2p/metrics.go index 8bd902286..4ed164431 100644 --- a/p2p/metrics.go +++ b/p2p/metrics.go @@ -37,6 +37,8 @@ const ( MetricsInboundTraffic = "p2p/InboundTraffic" // Name for the registered inbound traffic meter MetricsOutboundConnects = "p2p/OutboundConnects" // Name for the registered outbound connects meter MetricsOutboundTraffic = "p2p/OutboundTraffic" // Name for the registered outbound traffic meter + MetricsLatency = "p2p/Latency" // Name for the registered Latency gauge + MetricsRelativeLatency = "p2p/RelativeLatency" // Name for the registered Relative Latency gauge MeteredPeerLimit = 1024 // This amount of peers are individually metered ) @@ -52,6 +54,9 @@ var ( meteredPeerFeed event.Feed // Event feed for peer metrics meteredPeerCount int32 // Actually stored peer connection count + + peerLatency = metrics.NewRegisteredGauge(MetricsLatency, nil) // Gauge latency + peerRelativeLatency = metrics.NewRegisteredGauge(MetricsRelativeLatency, nil) // Gauge Relative latency ) // MeteredPeerEventType is the type of peer events emitted by a metered connection. |