Skip to content

Commit 5d3410e

Browse files
Fixups
1 parent beaa2e9 commit 5d3410e

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Add `raw_line_splitting` option to `splunk_hec` source to split incoming requests to the `/services/collector/raw` endpoint on newlines, creating separate events for each line. This is useful when receiving newline-delimited JSON (NDJSON) from sources like CloudFlare Logpush.
22

3+
authors: clundquist-stripe

src/sources/splunk_hec/mod.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,9 @@ impl SplunkSource {
533533
if let Some(token) = token.filter(|_| store_hec_token) {
534534
let token: Arc<str> = token.into();
535535
for event in &mut events {
536-
event.metadata_mut().set_splunk_hec_token(Arc::clone(&token));
536+
event
537+
.metadata_mut()
538+
.set_splunk_hec_token(Arc::clone(&token));
537539
}
538540
}
539541

@@ -1503,7 +1505,14 @@ mod tests {
15031505
SocketAddr,
15041506
PortGuard,
15051507
) {
1506-
source_with_options(token, valid_tokens, acknowledgements, store_hec_token, false).await
1508+
source_with_options(
1509+
token,
1510+
valid_tokens,
1511+
acknowledgements,
1512+
store_hec_token,
1513+
false,
1514+
)
1515+
.await
15071516
}
15081517

15091518
async fn source_with_options(

0 commit comments

Comments
 (0)