Skip to content

Commit 138c147

Browse files
authored
prom outflow: add max request size config (#96)
This will split outbound requests if the compressed size is too large. This is off by default and must be enabled in config. Signed-off-by: Matt Klein <[email protected]>
1 parent 4ffc3eb commit 138c147

File tree

46 files changed

+316
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+316
-186
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy as base
1+
FROM ubuntu:noble as base
22

33
RUN apt-get update \
44
&& apt-get upgrade -y \

pulse-common/src/k8s/pods_info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl PodsInfoSingleton {
129129
k8s_config
130130
.services_cache_interval
131131
.as_ref()
132-
.map_or(15.minutes(), bd_time::ProtoDurationExt::to_time_duration),
132+
.map_or_else(|| 15.minutes(), bd_time::ProtoDurationExt::to_time_duration),
133133
Box::new(RealServiceFetcher),
134134
))
135135
} else {
@@ -514,7 +514,7 @@ impl ResourceWatchCallbacks<Pod> for PodsInfoCache {
514514
async fn init_apply(&mut self, pod: Pod) {
515515
self
516516
.initializing_state
517-
.get_or_insert(PodsInfo::default())
517+
.get_or_insert_with(PodsInfo::default)
518518
.apply_pod(
519519
&self.node_info,
520520
&pod,

pulse-metrics/src/pipeline/inflow/otlp/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl OtlpInflow {
7676
config.bind.to_string(),
7777
config
7878
.path
79-
.map_or("/v1/metrics".to_string(), |p| p.to_string()),
79+
.map_or_else(|| "/v1/metrics".to_string(), |p| p.to_string()),
8080
config.downstream_id_source.unwrap_or_default(),
8181
context,
8282
Box::new(move |_inflow, headers, body, downstream_id_provider| {

pulse-metrics/src/pipeline/inflow/prom_scrape/scraper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ pub async fn make(
871871
let interval = http_service_discovery
872872
.fetch_interval
873873
.as_ref()
874-
.map_or(1.minutes(), bd_time::ProtoDurationExt::to_time_duration)
874+
.map_or_else(|| 1.minutes(), bd_time::ProtoDurationExt::to_time_duration)
875875
.interval(MissedTickBehavior::Delay);
876876
let target = HttpServiceDiscoveryEndpointTarget::new(
877877
http_service_discovery,

0 commit comments

Comments
 (0)