Enum vector_core::config::LogNamespace
source · pub enum LogNamespace {
Vector,
Legacy,
}
Variants§
Vector
Vector native namespacing
Deserialized data is placed in the root of the event. Extra data is placed in “event metadata”
Legacy
This is the legacy namespacing.
All data is set in the root of the event. Since this can lead to collisions, deserialized data has priority over metadata
Implementations§
source§impl LogNamespace
impl LogNamespace
sourcepub fn insert_source_metadata<'a>(
&self,
source_name: &'a str,
log: &mut LogEvent,
legacy_key: Option<LegacyKey<impl ValuePath<'a>>>,
metadata_key: impl ValuePath<'a>,
value: impl Into<Value>,
)
pub fn insert_source_metadata<'a>( &self, source_name: &'a str, log: &mut LogEvent, legacy_key: Option<LegacyKey<impl ValuePath<'a>>>, metadata_key: impl ValuePath<'a>, value: impl Into<Value>, )
Vector: This is added to “event metadata”, nested under the source name.
Legacy: This is stored on the event root, only if a field with that name doesn’t already exist.
sourcepub fn get_source_metadata<'a, 'b>(
&self,
source_name: &'a str,
log: &'b LogEvent,
legacy_key: impl ValuePath<'a>,
metadata_key: impl ValuePath<'a>,
) -> Option<&'b Value>
pub fn get_source_metadata<'a, 'b>( &self, source_name: &'a str, log: &'b LogEvent, legacy_key: impl ValuePath<'a>, metadata_key: impl ValuePath<'a>, ) -> Option<&'b Value>
Vector: This is retrieved from the “event metadata”, nested under the source name.
Legacy: This is retrieved from the event.
sourcepub fn insert_standard_vector_source_metadata(
&self,
log: &mut LogEvent,
source_name: &'static str,
now: DateTime<Utc>,
)
pub fn insert_standard_vector_source_metadata( &self, log: &mut LogEvent, source_name: &'static str, now: DateTime<Utc>, )
Vector: The ingest_timestamp
, and source_type
fields are added to “event metadata”, nested
under the name “vector”. This data will be marked as read-only in VRL.
Legacy: The values of source_type_key
, and timestamp_key
are stored as keys on the event root,
only if a field with that name doesn’t already exist.
sourcepub fn insert_vector_metadata<'a>(
&self,
log: &mut LogEvent,
legacy_key: Option<impl ValuePath<'a>>,
metadata_key: impl ValuePath<'a>,
value: impl Into<Value>,
)
pub fn insert_vector_metadata<'a>( &self, log: &mut LogEvent, legacy_key: Option<impl ValuePath<'a>>, metadata_key: impl ValuePath<'a>, value: impl Into<Value>, )
Vector: This is added to the “event metadata”, nested under the name “vector”. This data will be marked as read-only in VRL.
Legacy: This is stored on the event root, only if a field with that name doesn’t already exist.
sourcepub fn get_vector_metadata<'a, 'b>(
&self,
log: &'b LogEvent,
legacy_key: impl ValuePath<'a>,
metadata_key: impl ValuePath<'a>,
) -> Option<&'b Value>
pub fn get_vector_metadata<'a, 'b>( &self, log: &'b LogEvent, legacy_key: impl ValuePath<'a>, metadata_key: impl ValuePath<'a>, ) -> Option<&'b Value>
Vector: This is retrieved from the “event metadata”, nested under the name “vector”.
Legacy: This is retrieved from the event.
pub fn new_log_from_data(&self, value: impl Into<Value>) -> LogEvent
pub fn merge( &self, override_value: Option<impl Into<LogNamespace>>, ) -> LogNamespace
Trait Implementations§
source§impl Clone for LogNamespace
impl Clone for LogNamespace
source§fn clone(&self) -> LogNamespace
fn clone(&self) -> LogNamespace
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LogNamespace
impl Debug for LogNamespace
source§impl Default for LogNamespace
impl Default for LogNamespace
source§impl<'de> Deserialize<'de> for LogNamespace
impl<'de> Deserialize<'de> for LogNamespace
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<bool> for LogNamespace
impl From<bool> for LogNamespace
The user-facing config for log namespace is a bool (enabling or disabling the “Log Namespacing” feature). Internally, this is converted to a enum.
source§impl Ord for LogNamespace
impl Ord for LogNamespace
source§fn cmp(&self, other: &LogNamespace) -> Ordering
fn cmp(&self, other: &LogNamespace) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for LogNamespace
impl PartialEq for LogNamespace
source§impl PartialOrd for LogNamespace
impl PartialOrd for LogNamespace
source§impl Serialize for LogNamespace
impl Serialize for LogNamespace
impl Copy for LogNamespace
impl Eq for LogNamespace
impl StructuralPartialEq for LogNamespace
Auto Trait Implementations§
impl Freeze for LogNamespace
impl RefUnwindSafe for LogNamespace
impl Send for LogNamespace
impl Sync for LogNamespace
impl Unpin for LogNamespace
impl UnwindSafe for LogNamespace
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
§fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
] or
a color-specific method, such as [OwoColorize::green
], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
] or
a color-specific method, such as [OwoColorize::on_yellow
], Read more