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§fn eq(&self, other: &LogNamespace) -> bool
fn eq(&self, other: &LogNamespace) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LogNamespace
impl PartialOrd for LogNamespace
source§fn partial_cmp(&self, other: &LogNamespace) -> Option<Ordering>
fn partial_cmp(&self, other: &LogNamespace) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, 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