MCPcopy
hub / github.com/prometheus/client_golang / matchRuntimeMetricsRules

Function matchRuntimeMetricsRules

prometheus/go_collector_latest.go:126–148  ·  view source on GitHub ↗
(rules []internal.GoCollectorRule)

Source from the content-addressed store, hash-verified

124}
125
126func matchRuntimeMetricsRules(rules []internal.GoCollectorRule) []rmMetricDesc {
127 var descs []rmMetricDesc
128 for _, d := range metrics.All() {
129 var (
130 deny = true
131 desc rmMetricDesc
132 )
133
134 for _, r := range rules {
135 if !r.Matcher.MatchString(d.Name) {
136 continue
137 }
138 deny = r.Deny
139 }
140 if deny {
141 continue
142 }
143
144 desc.Description = d
145 descs = append(descs, desc)
146 }
147 return descs
148}
149
150func defaultGoCollectorOptions() internal.GoCollectorOptions {
151 return internal.GoCollectorOptions{

Callers 1

NewGoCollectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected