Skip to content

Commit 5464f11

Browse files
committed
feat: update metrics name
1 parent 7cd95da commit 5464f11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

metrics.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ func peerToMetrics(ts time.Time, deviceName string, peer *wgtypes.Peer) pmetric.
2727
}
2828

2929
func appendPeerMetrics(ms pmetric.MetricSlice, peer *wgtypes.Peer, ts pcommon.Timestamp) {
30-
gaugeI(ms, "peer.usage.rx_bytes", "By", peer.ReceiveBytes, ts)
31-
gaugeI(ms, "peer.usage.tx_bytes", "By", peer.TransmitBytes, ts)
30+
gaugeI(ms, "usage.rx_bytes", "By", peer.ReceiveBytes, ts)
31+
gaugeI(ms, "usage.tx_bytes", "By", peer.TransmitBytes, ts)
3232
}
3333

3434
func initMetric(ms pmetric.MetricSlice, name, unit string) pmetric.Metric {
3535
m := ms.AppendEmpty()
36-
m.SetName(fmt.Sprintf("device.%s", name))
36+
m.SetName(fmt.Sprintf("peer.%s", name))
3737
m.SetUnit(unit)
3838
return m
3939
}

0 commit comments

Comments
 (0)