prometheus/util
bwplotka 8600c1410a scrape: Added option to scrape without initial jitter and on shutdown.
To experiment with Prometheus pull methond on semi-short lived serverless environments
we (Google Cloud) want to attempt init and shutdown scrapes to have some basic data from
short lived workloads. This has little sense for Prometheus scrape manager,
but it might be useful for external importers like OpenTelemetry and distributions,
which can be deployed in various configurations (e.g. sidecar with just single target).

It's up to us to merge it or close. I would be fine maintaining on upstream, but we
might as well keep it in our fork to experiment on this--and perhaps merge once official
contrib Otel decides to use those options.

NOTE: Also added high level scrape manager test. I think it was kind of bad we never had test integrating
all scrape manager pieces. Can add that in separate PR as well.

Alternatives attempted:

* Manager Option for scrape on shutdown. This was not trivial due to 3 different context we pass. We would need to disconnect them from parent context (sometimes) for scrapeAndReport. Intrusive and prone to mistaken cancelations.
* ForceScrape method. This is not trivia as the scrape would need to be additionally locked. Plus semantics on what to do after (continue interval?) is not clear. We can scope this problem down to stopAndScrape semantics.

Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-08-14 21:03:55 +01:00
..
documentcli promtool docs: write flags between backtits in help 2023-07-15 22:32:59 +02:00
fmtutil fix: apply suggested changes 2023-06-27 09:30:39 +02:00
gate Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
httputil Revert "Improving Performance on the API Gzip Handler (#12363)" 2023-06-20 13:39:32 +02:00
jsonutil Name float values as "floats", not as "values" 2023-04-13 19:25:24 +02:00
logging lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
osutil Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
pool Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
runtime Merge pull request #12231 from Loongson-Cloud-Community/main 2023-05-28 15:12:34 +02:00
runutil scrape: Added option to scrape without initial jitter and on shutdown. 2023-08-14 21:03:55 +01:00
stats Replace sort.Sort with faster slices.SortFunc 2023-07-10 09:43:45 +00:00
strutil Implement SanitizeLabelName and Full variant 2023-02-03 15:28:33 +00:00
teststorage Add a feature flag to control native histogram ingestion (#11253) 2022-09-14 17:38:34 +05:30
testutil lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
treecache style: Replace else if cascades with switch 2023-04-19 17:22:31 +02:00
zeropool Use zeropool.Pool to workaround SA6002 (#12189) 2023-03-29 20:34:34 +01:00