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

Struct goCollector

prometheus/go_collector_latest.go:94–120  ·  prometheus/go_collector_latest.go::goCollector

Source from the content-addressed store, hash-verified

92}
93
94type goCollector struct {
95 base baseGoCollector
96
97 // mu protects updates to all fields ensuring a consistent
98 // snapshot is always produced by Collect.
99 mu sync.Mutex
100
101 // Contains all samples that has to retrieved from runtime/metrics (not all of them will be exposed).
102 sampleBuf []metrics.Sample
103 // sampleMap allows lookup for MemStats metrics and runtime/metrics histograms for exact sums.
104 sampleMap map[string]*metrics.Sample
105
106 // rmExposedMetrics represents all runtime/metrics package metrics
107 // that were configured to be exposed.
108 rmExposedMetrics []collectorMetric
109 rmExactSumMapForHist map[string]string
110
111 // With Go 1.17, the runtime/metrics package was introduced.
112 // From that point on, metric names produced by the runtime/metrics
113 // package could be generated from runtime/metrics names. However,
114 // these differ from the old names for the same values.
115 //
116 // This field exists to export the same values under the old names
117 // as well.
118 msMetrics memStatsMetrics
119 msMetricsEnabled bool
120}
121
122type rmMetricDesc struct {
123 metrics.Description

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected