Manager maintains a set of scrape pools and manages start/stop cycles when receiving new target groups from the discovery manager.
| 184 | // Manager maintains a set of scrape pools and manages start/stop cycles |
| 185 | // when receiving new target groups from the discovery manager. |
| 186 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected