Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.d/prometheus_scrape_scrape_delay.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The `prometheus_scrape` source has a new `scrape_delay` option that controls when scrapes happen relative to the configured `scrape_interval_secs`. Sources sharing an interval otherwise all scrape at the same instant, so an instance running many of them raises load in a single spike each interval.

`none`, the default, keeps the existing behavior unchanged. A delay in seconds, such as `30s`, holds the first scrape back by that much and then keeps the same fixed cadence, so sources can be staggered by hand. `auto` instead picks a position inside each interval, derived from a hash of the host name, the component ID and the scrape number, which reduces persistent alignment with other periodic work. See the option docs for the trade-offs `auto` makes.

authors: taloric
2 changes: 2 additions & 0 deletions src/sources/http_client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ impl SourceConfig for HttpClientConfig {
let inputs = GenericHttpClientInputs {
urls,
interval: self.interval,
initial_delay: Duration::ZERO,
jitter_seed: None,
timeout: self.timeout,
headers: self.headers.clone(),
content_type,
Expand Down
Loading
Loading