Skip to content

Commit

Permalink
feat(sources): Update exec source to execute command or VRL
Browse files Browse the repository at this point in the history
Updates the exec source to allow execution of a
command or VRL in streaming or scheduled mode.

Ref: LOG-19574
  • Loading branch information
biblicalph authored and darinspivey committed Apr 10, 2024
1 parent c6f775c commit 38622aa
Show file tree
Hide file tree
Showing 3 changed files with 643 additions and 184 deletions.
26 changes: 26 additions & 0 deletions src/internal_events/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,29 @@ impl InternalEvent for ExecChannelClosedError {
});
}
}

#[derive(Debug)]
pub struct ExecVrlEventsReceived<'a> {
pub count: usize,
pub source: &'a str,
pub byte_size: JsonSize,
}

impl InternalEvent for ExecVrlEventsReceived<'_> {
fn emit(self) {
trace!(
message = "Events received.",
count = self.count,
byte_size = self.byte_size.get(),
command = %self.source,
);
counter!(
"component_received_events_total", self.count as u64,
"source" => self.source.to_owned(),
);
counter!(
"component_received_event_bytes_total", self.byte_size.get() as u64,
"source" => self.source.to_owned(),
);
}
}
Loading

0 comments on commit 38622aa

Please sign in to comment.