MCPcopy
hub / github.com/livekit/livekit / initDebugStats

Function initDebugStats

pkg/telemetry/prometheus/debug.go:27–36  ·  view source on GitHub ↗
(nodeID string, nodeType livekit.NodeType)

Source from the content-addressed store, hash-verified

25)
26
27func initDebugStats(nodeID string, nodeType livekit.NodeType) {
28 refCounts = prometheus.NewGaugeVec(prometheus.GaugeOpts{
29 Namespace: livekitNamespace,
30 Subsystem: "debug",
31 Name: "ref_count",
32 ConstLabels: prometheus.Labels{"node_id": nodeID, "node_type": nodeType.String()},
33 }, []string{"referrer"})
34
35 prometheus.MustRegister(refCounts)
36}
37
38func AddRef(referrer string, n int) {
39 refCounts.WithLabelValues(referrer).Add(float64(n))

Callers 1

InitFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected