Skip to main content

FileSetMetrics

Struct FileSetMetrics 

Source
pub struct FileSetMetrics { /* private fields */ }
Expand description

Metrics produced by the file writer.

You can enumerate the metrics using the emit::metric::Source implementation. See [emit::metric] for details.

Implementations§

Source§

impl FileSetMetrics

Source

pub fn file_set_read_failed(&self) -> usize

Attempting to read the set of log files failed.

Source

pub fn file_open_failed(&self) -> usize

Attempting to open a log file failed.

Source

pub fn file_create(&self) -> usize

A new log file was created.

Source

pub fn file_create_failed(&self) -> usize

Attempting to create a new log file failed.

Source

pub fn file_write_failed(&self) -> usize

Attempting to write to a log file failed.

Source

pub fn file_delete(&self) -> usize

A log file was deleted.

Source

pub fn file_delete_failed(&self) -> usize

Attempting to delete a log file failed.

Source

pub fn event_format_failed(&self) -> usize

Attempting to format an event into a batch failed and was discarded.

This happens before the event is written to any log files.

Source

pub fn configuration_failed(&self) -> usize

Attempting to configure the emitter failed.

This happens when file paths or other configuration properties are malformed. The emitter won’t write any events until configuration is fixed and the process is restarted.

Trait Implementations§

Source§

impl Source for FileSetMetrics

Source§

fn sample_metrics<S: Sampler>(&self, sampler: S)

Produce a current sample for all metrics in the source.
Source§

fn and_sample<U>(self, other: U) -> And<Self, U>
where Self: Sized,

Chain this source to other, sampling metrics from both.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedSource for T
where T: Source,