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