MCPcopy Index your code
hub / github.com/prometheus/prometheus / newQueueManagerMetrics

Function newQueueManagerMetrics

storage/remote/queue_manager.go:104–333  ·  view source on GitHub ↗
(r prometheus.Registerer, rn, e string)

Source from the content-addressed store, hash-verified

102}
103
104func newQueueManagerMetrics(r prometheus.Registerer, rn, e string) *queueManagerMetrics {
105 m := &queueManagerMetrics{
106 reg: r,
107 }
108 constLabels := prometheus.Labels{
109 remoteName: rn,
110 endpoint: e,
111 }
112
113 m.samplesTotal = prometheus.NewCounter(prometheus.CounterOpts{
114 Namespace: namespace,
115 Subsystem: subsystem,
116 Name: "samples_total",
117 Help: "Total number of samples sent to remote storage.",
118 ConstLabels: constLabels,
119 })
120 m.exemplarsTotal = prometheus.NewCounter(prometheus.CounterOpts{
121 Namespace: namespace,
122 Subsystem: subsystem,
123 Name: "exemplars_total",
124 Help: "Total number of exemplars sent to remote storage.",
125 ConstLabels: constLabels,
126 })
127 m.histogramsTotal = prometheus.NewCounter(prometheus.CounterOpts{
128 Namespace: namespace,
129 Subsystem: subsystem,
130 Name: "histograms_total",
131 Help: "Total number of histograms sent to remote storage.",
132 ConstLabels: constLabels,
133 })
134 m.metadataTotal = prometheus.NewCounter(prometheus.CounterOpts{
135 Namespace: namespace,
136 Subsystem: subsystem,
137 Name: "metadata_total",
138 Help: "Total number of metadata entries sent to remote storage.",
139 ConstLabels: constLabels,
140 })
141 m.failedSamplesTotal = prometheus.NewCounter(prometheus.CounterOpts{
142 Namespace: namespace,
143 Subsystem: subsystem,
144 Name: "samples_failed_total",
145 Help: "Total number of samples which failed on send to remote storage, non-recoverable errors.",
146 ConstLabels: constLabels,
147 })
148 m.failedExemplarsTotal = prometheus.NewCounter(prometheus.CounterOpts{
149 Namespace: namespace,
150 Subsystem: subsystem,
151 Name: "exemplars_failed_total",
152 Help: "Total number of exemplars which failed on send to remote storage, non-recoverable errors.",
153 ConstLabels: constLabels,
154 })
155 m.failedHistogramsTotal = prometheus.NewCounter(prometheus.CounterOpts{
156 Namespace: namespace,
157 Subsystem: subsystem,
158 Name: "histograms_failed_total",
159 Help: "Total number of histograms which failed on send to remote storage, non-recoverable errors.",
160 ConstLabels: constLabels,
161 })

Callers 5

newTestQueueManagerFunction · 0.85
BenchmarkStoreSeriesFunction · 0.85
TestQueueManagerMetricsFunction · 0.85
ApplyConfigMethod · 0.85

Calls

no outgoing calls

Tested by 4

newTestQueueManagerFunction · 0.68
BenchmarkStoreSeriesFunction · 0.68
TestQueueManagerMetricsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…