mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 23:10:12 -08:00
b87d3ca9ea
When a target is no longer returned from SD stop() is called. However it may be recreated before the next scrape interval happens. So we wait to set stalemarkers until the scrape of the new target would have happened and been ingested, which is 2 scrape intervals. If we're shutting down the context will be cancelled, so return immediately rather than holding things up for potentially minutes waiting to safely set stalemarkers no newer than now. If the server starts immediately back up again all is well. If not, we're missing some stale markers. |
||
---|---|---|
.. | ||
testdata | ||
helpers_test.go | ||
scrape.go | ||
scrape_test.go | ||
target.go | ||
target_test.go | ||
targetmanager.go | ||
targetmanager_test.go |