net/sockstats: disable deltas for the cell radio power state metric
Updates tailscale/corp#9230 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
parent
22680a11ae
commit
e978299bf0
|
@ -63,6 +63,14 @@ var sockStats = struct {
|
|||
radioHighMetric: clientmetric.NewGaugeFunc("sockstats_cellular_radio_high_fraction", radio.radioHighPercent),
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Deltas are not useful for this gauge metric, we want the collector to be
|
||||
// able to get current values without having to wait for the 4 hour
|
||||
// metricLogNameFrequency interval (by which point the cell radio state may
|
||||
// be very different).
|
||||
sockStats.radioHighMetric.DisableDeltas()
|
||||
}
|
||||
|
||||
func withSockStats(ctx context.Context, label Label) context.Context {
|
||||
sockStats.mu.Lock()
|
||||
defer sockStats.mu.Unlock()
|
||||
|
|
Loading…
Reference in New Issue