pub struct NoOpMetrics;Expand description
No-op metrics collector for default behavior
Trait Implementations§
Source§impl MetricsCollector for NoOpMetrics
impl MetricsCollector for NoOpMetrics
Source§fn record_exchange_duration(&self, _route_id: &str, _duration: Duration)
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)
fn increment_errors(&self, _route_id: &str, _error_type: &str)
Increment error counter
Source§fn increment_exchanges(&self, _route_id: &str)
fn increment_exchanges(&self, _route_id: &str)
Increment exchange counter
Source§fn set_queue_depth(&self, _queue: &str, _depth: usize)
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)
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)])
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)])
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)
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)
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)
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)
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)
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)
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,
)
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)
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)
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)
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)
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§
impl Freeze for NoOpMetrics
impl RefUnwindSafe for NoOpMetrics
impl Send for NoOpMetrics
impl Sync for NoOpMetrics
impl Unpin for NoOpMetrics
impl UnsafeUnpin for NoOpMetrics
impl UnwindSafe for NoOpMetrics
Blanket Implementations§
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
Mutably borrows from an owned value. Read more