Skip to content

Commit eee6e66

Browse files
sbalmospront
andauthored
fix(splunk_hec sink): disable compression in HEC indexer ack queries (#23560)
* Force compression to be disabled in HEC indexer ack queries * Add changelog fragment * Add future work issue link comment * cargo fmt again --------- Co-authored-by: Pavlos Rontidis <[email protected]>
1 parent 5671d44 commit eee6e66

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixes the `splunk_hec` sink to not use compression on indexer acknowledgement queries.
2+
3+
authors: sbalmos

src/sinks/splunk_hec/common/acknowledgements.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use crate::{
1818
SplunkIndexerAcknowledgementAPIError, SplunkIndexerAcknowledgementAckAdded,
1919
SplunkIndexerAcknowledgementAcksRemoved,
2020
},
21+
sinks::util::Compression,
2122
};
2223

2324
/// Splunk HEC acknowledgement configuration.
@@ -95,6 +96,12 @@ impl HecAckClient {
9596
client: HttpClient,
9697
http_request_builder: Arc<HttpRequestBuilder>,
9798
) -> Self {
99+
// Reimplement with compression support, see https://github.com/vectordotdev/vector/issues/23748
100+
let http_request_builder = Arc::new(HttpRequestBuilder {
101+
compression: Compression::None,
102+
..(*http_request_builder).clone()
103+
});
104+
98105
Self {
99106
acks: HashMap::new(),
100107
retry_limit,

src/sinks/splunk_hec/common/service.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ impl ResponseExt for http::Response<Bytes> {
177177
}
178178
}
179179

180+
#[derive(Clone)]
180181
pub struct HttpRequestBuilder {
181182
pub endpoint_target: EndpointTarget,
182183
pub endpoint: String,

0 commit comments

Comments
 (0)