dnstap_parser/
internal_events.rs

1use tracing::warn;
2use vector_lib::internal_event::{InternalEvent, error_stage, error_type};
3
4#[derive(Debug)]
5pub(crate) struct DnstapParseWarning<E> {
6    pub error: E,
7}
8
9impl<E: std::fmt::Display> InternalEvent for DnstapParseWarning<E> {
10    fn emit(self) {
11        warn!(
12            message = "Recoverable error occurred while parsing dnstap data.",
13            error = %self.error,
14            stage = error_stage::PROCESSING,
15            error_type = error_type::PARSER_FAILED,
16            internal_log_rate_limit = true,
17        );
18    }
19}