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