Update dependencies
This commit is contained in:
1 parent
f0641ffd6e
commit
5a9cfc022c
882 files changed
+68907
-24178
No files matched your search
+14
@@ -14,11 +14,15 @@ import (
|
||||
|
||||
"tailscale.com/metrics"
|
||||
"tailscale.com/tsweb/varz"
|
||||
"tailscale.com/util/set"
|
||||
)
|
||||
|
||||
// Registry tracks user-facing metrics of various Tailscale subsystems.
|
||||
type Registry struct {
|
||||
vars expvar.Map
|
||||
|
||||
// m contains common metrics owned by the registry.
|
||||
m Metrics
|
||||
}
|
||||
|
||||
// NewMultiLabelMapWithRegistry creates and register a new
|
||||
@@ -103,3 +107,13 @@ func (r *Registry) String() string {
|
||||
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
// Metrics returns the name of all the metrics in the registry.
|
||||
func (r *Registry) MetricNames() []string {
|
||||
ret := make(set.Set[string])
|
||||
r.vars.Do(func(kv expvar.KeyValue) {
|
||||
ret.Add(kv.Key)
|
||||
})
|
||||
|
||||
return ret.Slice()
|
||||
}
|
||||
Reference in new issue
Block a user