Skip to main content

TuiMetrics

Struct TuiMetrics 

Source
#[repr(align(64))]
pub struct TuiMetrics {
Show 28 fields pub total_events: AtomicUsize, pub error_count: AtomicUsize, pub active_spans: AtomicUsize, pub throughput: AtomicUsize, pub peak_throughput: AtomicUsize, pub start_epoch_secs: AtomicUsize, pub level_trace: AtomicUsize, pub level_debug: AtomicUsize, pub level_info: AtomicUsize, pub level_warn: AtomicUsize, pub level_error: AtomicUsize, pub level_fatal: AtomicUsize, pub level_critical: AtomicUsize, pub dropped_events: AtomicUsize, pub fmt_clf: AtomicUsize, pub fmt_json: AtomicUsize, pub fmt_cef: AtomicUsize, pub fmt_elf: AtomicUsize, pub fmt_w3c: AtomicUsize, pub fmt_gelf: AtomicUsize, pub fmt_apache: AtomicUsize, pub fmt_logstash: AtomicUsize, pub fmt_log4j: AtomicUsize, pub fmt_ndjson: AtomicUsize, pub fmt_mcp: AtomicUsize, pub fmt_otlp: AtomicUsize, pub fmt_logfmt: AtomicUsize, pub fmt_ecs: AtomicUsize,
}
Expand description

Atomic counters for the TUI dashboard. Cache-line aligned (repr(align(64))).

Fields§

§total_events: AtomicUsize

Total number of log events ingested.

§error_count: AtomicUsize

Number of error/fatal events.

§active_spans: AtomicUsize

Number of active spans (OpenTelemetry style).

§throughput: AtomicUsize

Calculated events per second.

§peak_throughput: AtomicUsize

Peak throughput (events per second).

§start_epoch_secs: AtomicUsize

Engine start time (epoch seconds).

§level_trace: AtomicUsize

TRACE-level event count.

§level_debug: AtomicUsize

DEBUG-level event count.

§level_info: AtomicUsize

INFO-level event count.

§level_warn: AtomicUsize

WARN-level event count.

§level_error: AtomicUsize

ERROR-level event count.

§level_fatal: AtomicUsize

FATAL-level event count.

§level_critical: AtomicUsize

CRITICAL-level event count.

§dropped_events: AtomicUsize

Number of events dropped due to full ring buffer.

§fmt_clf: AtomicUsize

CLF format count.

§fmt_json: AtomicUsize

JSON format count.

§fmt_cef: AtomicUsize

CEF format count.

§fmt_elf: AtomicUsize

ELF format count.

§fmt_w3c: AtomicUsize

W3C format count.

§fmt_gelf: AtomicUsize

GELF format count.

§fmt_apache: AtomicUsize

Apache Access Log format count.

§fmt_logstash: AtomicUsize

Logstash format count.

§fmt_log4j: AtomicUsize

Log4j XML format count.

§fmt_ndjson: AtomicUsize

NDJSON format count.

§fmt_mcp: AtomicUsize

MCP format count.

§fmt_otlp: AtomicUsize

OTLP format count.

§fmt_logfmt: AtomicUsize

Logfmt format count.

§fmt_ecs: AtomicUsize

ECS format count.

Implementations§

Source§

impl TuiMetrics

Source

pub fn inc_events(&self)

Increments the total event count.

Source

pub fn inc_errors(&self)

Increments the error count.

Source

pub fn inc_spans(&self)

Increments active spans.

Source

pub fn dec_spans(&self)

Decrements active spans.

Source

pub fn inc_dropped(&self)

Increments the dropped event count.

Source

pub fn inc_level(&self, level: LogLevel)

Increments the counter for the given log level.

Source

pub fn inc_format(&self, format: LogFormat)

Increments the counter for the given log format.

Trait Implementations§

Source§

impl Debug for TuiMetrics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TuiMetrics

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.