vector/internal_events/
conditions.rs1use metrics::counter;
2use vector_lib::internal_event::InternalEvent;
3use vector_lib::internal_event::{error_stage, error_type};
4
5#[derive(Debug, Copy, Clone)]
6pub struct VrlConditionExecutionError<'a> {
7 pub error: &'a str,
8}
9
10impl InternalEvent for VrlConditionExecutionError<'_> {
11 fn emit(self) {
12 error!(
13 message = "VRL condition execution failed.",
14 error = %self.error,
15 error_type = error_type::SCRIPT_FAILED,
16 stage = error_stage::PROCESSING,
17 internal_log_rate_limit = true,
18 );
19 counter!(
20 "component_errors_total",
21 "error_type" => error_type::SCRIPT_FAILED,
22 "stage" => error_stage::PROCESSING,
23 )
24 .increment(1);
25 }
26}