wgengine: use underlying expvar for usermetrics

avoid the mutex in MultiLabelMap

Updates tailscale/corp#22075

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby
2024-09-25 17:58:54 +02:00
parent 5bee939fde
commit 21e86013dd
4 changed files with 126 additions and 83 deletions

View File

@@ -691,8 +691,8 @@ func (c *connBind) receiveDERP(buffs [][]byte, sizes []int, eps []conn.Endpoint)
continue
}
metricRecvDataPacketsDERP.Add(1)
c.metrics.inboundPacketsTotal.Add(pathLabel{Path: PathDERP}, 1)
c.metrics.inboundBytesTotal.Add(pathLabel{Path: PathDERP}, int64(n))
c.metrics.inboundPacketsDERPTotal.Add(1)
c.metrics.inboundBytesDERPTotal.Add(int64(n))
sizes[0] = n
eps[0] = ep
return 1, nil