Skip to main content

NoOpMetrics

Struct NoOpMetrics 

Source
pub struct NoOpMetrics;
Expand description

No-op metrics collector for default behavior

Trait Implementations§

Source§

impl MetricsCollector for NoOpMetrics

Source§

fn record_exchange_duration(&self, _route_id: &str, _duration: Duration)

Record exchange processing time
Source§

fn increment_errors(&self, _route_id: &str, _error_type: &str)

Increment error counter
Source§

fn increment_exchanges(&self, _route_id: &str)

Increment exchange counter
Source§

fn set_queue_depth(&self, _queue: &str, _depth: usize)

Update the depth of a buffered stage’s queue (camel_queue_depth{queue}). The queue label is a closed set of component-declared identifiers (seda:<endpoint-name>, aggregator:<route>, resequencer:<route>).
Source§

fn record_circuit_breaker_change(&self, _route_id: &str, _from: &str, _to: &str)

Record circuit breaker state change
Source§

fn record_histogram(&self, _name: &str, _value: f64, _labels: &[(&str, &str)])

Record a histogram observation (e.g., cost, latency distribution). Default: no-op (backward-compatible).
Source§

fn record_counter(&self, _name: &str, _value: f64, _labels: &[(&str, &str)])

Record a monotonically-increasing counter (e.g. foo_total). Default: no-op (backward-compatible).
Source§

fn increment_retry_attempt(&self, _scheme: &str, _operation: &str)

Increment the per-attempt retry counter (camel_retry_attempts_total, labels scheme+operation). Called once per retry attempt, including the first. Default: no-op (backward-compatible).
Source§

fn increment_circuit_breaker_rejection(&self, _route: &str)

Increment the circuit-breaker rejection counter (camel_circuit_breaker_rejections_total, label route). Open-breaker fast-fails count here, not as errors. Default: no-op (backward-compatible).
Source§

fn set_route_state(&self, _route: &str, _state: &str)

Publish a route lifecycle-state transition (camel_route_state, labels route+state). state is the projection’s state label — a closed set by construction (Registered, Starting, Started, Suspended, Stopping, Stopped, Failed). Implementations keep the route’s last-published state so a transition sets the new series to 1 and zeroes the previous one. Default: no-op (backward-compatible).
Source§

fn clear_route_state(&self, _route: &str)

Drop a route’s state series (route removed/undeployed) so a scrape reflects only routes that exist.
Source§

fn record_build_info(&self, _version: &str, _git_sha: &str)

Publish build identification (camel_build_info{git_sha,version}, value 1). Called once when the context is built. Default: no-op (backward-compatible).
Source§

fn record_uptime(&self, _seconds: f64)

Publish process uptime in seconds (camel_uptime_seconds), refreshed periodically by the runtime. Default: no-op (backward-compatible).
Source§

fn record_component_operation( &self, _component: &str, _operation: &str, _outcome: &str, )

Increment the uniform component-operations counter (camel_component_operations_total, labels component+operation+ outcome). outcome is a closed set — “success” or “failure” only; callers derive it from a bool (see ComponentMetrics), never pass free text. Default: no-op (backward-compatible).
Source§

fn set_pinned_client_cache_size(&self, _component: &str, _entries: u64)

Publish the pinned client cache size for a component (camel_pinned_client_cache_size{component}, gauge, unit: entries). Emitted by the owning component after each lookup, reflecting the current (approximate) entry count. Default: no-op (backward-compatible).
Source§

fn increment_pinned_client_cache_hit(&self, _component: &str)

Increment the pinned client cache hit counter for a component (camel_pinned_client_cache_hits_total{component}) — a pinned lookup served by the cache without a rebuild. Default: no-op (backward-compatible).
Source§

fn increment_pinned_client_cache_miss(&self, _component: &str)

Increment the pinned client cache miss counter for a component (camel_pinned_client_cache_misses_total{component}) — a pinned lookup that required a client rebuild. Default: no-op (backward-compatible).
Source§

fn set_allocator_memory(&self, _stat: AllocatorStat, _bytes: u64)

Publish an allocator memory statistic (camel_allocator_memory_bytes{stat}, gauge, unit: bytes). stat is a closed AllocatorStat variant; the sampler refreshes the current value periodically. Default: no-op (backward-compatible).

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> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, <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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more