util/usermetrics: add package and container for usermetrics

Signed-off-by: Kristoffer Dalby <[email protected]>
This commit is contained in:
Kristoffer Dalby committed 2024-08-15 18:22:56 +02:00
1 parent dd5499ed5f
commit 9eec0d969c
10 files changed
+82 -28

No files matched your search

+3 -3
View File
@@ -24,7 +24,6 @@ import (
"go4.org/mem"
"gvisor.dev/gvisor/pkg/tcpip/stack"
"tailscale.com/disco"
"tailscale.com/metrics"
"tailscale.com/net/connstats"
"tailscale.com/net/packet"
"tailscale.com/net/packet/checksum"
@@ -35,6 +34,7 @@ import (
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/util/clientmetric"
"tailscale.com/util/usermetrics"
"tailscale.com/wgengine/capture"
"tailscale.com/wgengine/filter"
"tailscale.com/wgengine/wgcfg"
@@ -1434,12 +1434,12 @@ type trafficLabel struct {
}
var (
metricInboundPacketsTotal = metrics.NewMultiLabelMap[trafficLabel](
metricInboundPacketsTotal = usermetrics.NewMultiLabelMap[trafficLabel](
"tailscaled_inbound_packets_total",
"counter",
"Counts the number of packets received by the node from other peers",
)
metricOutboundPacketsTotal = metrics.NewMultiLabelMap[trafficLabel](
metricOutboundPacketsTotal = usermetrics.NewMultiLabelMap[trafficLabel](
"tailscaled_outbound_packets_total",
"counter",
"Counts the number of packets sent by the node to other peers",