MCPcopy
hub / github.com/prometheus/prometheus / Manager

Struct Manager

scrape/manager.go:186–207  ·  view source on GitHub ↗

Manager maintains a set of scrape pools and manages start/stop cycles when receiving new target groups from the discovery manager.

Source from the content-addressed store, hash-verified

184// Manager maintains a set of scrape pools and manages start/stop cycles
185// when receiving new target groups from the discovery manager.
186type Manager struct {
187 opts *Options
188 logger *slog.Logger
189
190 appendable storage.Appendable
191 appendableV2 storage.AppendableV2
192
193 graceShut chan struct{}
194
195 offsetSeed uint64 // Global offsetSeed seed is used to spread scrape workload across HA setup.
196 mtxScrape sync.Mutex // Guards the fields below.
197 scrapeConfigs map[string]*config.ScrapeConfig
198 scrapePools map[string]*scrapePool
199 newScrapeFailureLogger func(string) (*logging.JSONFileLogger, error)
200 scrapeFailureLoggers map[string]FailureLogger
201 targetSets map[string][]*targetgroup.Group
202 buffers *pool.Pool
203
204 triggerReload chan struct{}
205
206 metrics *scrapeMetrics
207}
208
209// Run receives and saves target set updates and triggers the scraping loops reloading.
210// Reloading happens in the background so that it doesn't block receiving targets updates.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected