Makes the metrics easier to interpret. Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -827,6 +827,11 @@ func (s *service) logListenAddressesChangedEvent(l ListenerAddresses) {
|
|||||||
func (s *service) CommitConfiguration(from, to config.Configuration) bool {
|
func (s *service) CommitConfiguration(from, to config.Configuration) bool {
|
||||||
newDevices := make(map[protocol.DeviceID]bool, len(to.Devices))
|
newDevices := make(map[protocol.DeviceID]bool, len(to.Devices))
|
||||||
for _, dev := range to.Devices {
|
for _, dev := range to.Devices {
|
||||||
|
if dev.DeviceID == s.myID {
|
||||||
|
// Do not report connection metrics for ourselves
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
newDevices[dev.DeviceID] = true
|
newDevices[dev.DeviceID] = true
|
||||||
registerDeviceMetrics(dev.DeviceID.String())
|
registerDeviceMetrics(dev.DeviceID.String())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user