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