Skip to main content

PrometheusMetrics

Struct PrometheusMetrics 

Source
pub struct PrometheusMetrics { /* private fields */ }

Implementations§

Source§

impl PrometheusMetrics

Source

pub fn new() -> Result<Self, Error>

Source

pub fn record_grpc(&self, method: &str, status: &str, seconds: f64)

Source

pub fn observe_pg_query(&self, op: &str, table: &str, seconds: f64)

Source

pub fn inc_cache_op(&self, op: &str, hit: bool)

Source

pub fn inc_vector_op(&self, collection: &str, op: &str)

Source

pub fn inc_object_op(&self, bucket: &str, method: &str)

Source

pub fn gather_text(&self, extra: &str) -> String

Source

pub fn inc_channel_inflight(&self, channel: &str)

Source

pub fn dec_channel_inflight(&self, channel: &str)

Source

pub fn inc_channel_rejected(&self, channel: &str)

Source

pub fn inc_channel_timeout(&self, channel: &str)

Source

pub fn observe_channel_latency(&self, channel: &str, seconds: f64)

Source

pub fn record_fair_admission( &self, project: &str, tenant_hash: &str, backend: &str, instance: &str, operation: &str, result: &str, )

Source

pub fn add_fair_cost( &self, project: &str, tenant_hash: &str, backend: &str, instance: &str, operation: &str, cost: f64, )

Trait Implementations§

Source§

impl Clone for PrometheusMetrics

Source§

fn clone(&self) -> PrometheusMetrics

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PrometheusMetrics

Source§

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

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

impl MetricsRecorder for PrometheusMetrics

Source§

fn record_grpc(&self, method: &str, status: &str, seconds: f64)

Source§

fn observe_pg_query(&self, op: &str, table: &str, seconds: f64)

Source§

fn inc_cache_op(&self, op: &str, hit: bool)

Source§

fn inc_vector_op(&self, collection: &str, op: &str)

Source§

fn inc_object_op(&self, bucket: &str, method: &str)

Source§

fn inc_channel_inflight(&self, channel: &str)

Source§

fn dec_channel_inflight(&self, channel: &str)

Source§

fn inc_channel_rejected(&self, channel: &str)

Source§

fn inc_channel_timeout(&self, channel: &str)

Source§

fn observe_channel_latency(&self, channel: &str, seconds: f64)

Source§

fn record_fair_admission( &self, project: &str, tenant_hash: &str, backend: &str, instance: &str, op: &str, status: &str, )

Source§

fn add_fair_cost( &self, project: &str, tenant_hash: &str, backend: &str, instance: &str, op: &str, cost: f64, )

Source§

fn inc_runs_total(&self, status: &str)

Increment the migration run counter. Read more
Source§

fn inc_operations_total(&self, kind: &str, schema: &str, safety: &str)

Increment the per-operation counter. Read more
Source§

fn observe_file_duration(&self, schema: &str, seconds: f64)

Record the wall-clock duration of applying one migration artefact, in seconds. Read more
Source§

fn set_blocked_operations(&self, schema: &str, kind: &str, count: i64)

Set the current count of blocked (non-auto-applicable) operations. Read more
Source§

fn inc_lint_warnings(&self, kind: &str)

Increment the lint warning counter. Read more
Source§

fn observe_run_duration(&self, status: &str, seconds: f64)

Record the total duration of a complete migration run, in seconds. Read more
Source§

fn set_pending_files(&self, count: i64)

Emit a gauge for the number of pending migration artefacts (SQL files + Qdrant collections + MinIO buckets not yet applied).
Source§

fn set_cdc_is_leader(&self, host: &str, is_leader: bool)

Source§

fn inc_cdc_wal_messages_received_total(&self)

Source§

fn inc_cdc_events_published_total(&self, topic: &str)

Source§

fn inc_cdc_errors_total(&self, reason: &str)

Source§

fn set_cdc_lag_seconds(&self, seconds: f64)

Source§

fn set_cdc_outbox_depth(&self, depth: i64)

Source§

fn set_cdc_dlq_depth(&self, depth: i64)

Source§

fn observe_cdc_publish_duration_seconds(&self, seconds: f64)

Source§

fn inc_cdc_dlq_replayed_total(&self)

Source§

fn inc_cdc_duplicate_skipped_total(&self)

Source§

fn set_saga_active(&self, count: i64)

Set the current count of active (IN_PROGRESS) sagas.
Source§

fn inc_saga_compensated_total(&self)

Increment the count of sagas that reached COMPENSATED terminal state.
Source§

fn inc_saga_failed_compensations_total(&self)

Increment the count of compensation actions that failed.
Source§

fn observe_saga_duration_seconds(&self, seconds: f64)

Record the wall-clock duration of a complete saga transaction, in seconds.
Source§

fn set_projection_tasks_pending( &self, backend: &str, instance: &str, kind: &str, count: i64, )

Set the current count of PENDING projection tasks for a backend.
Source§

fn inc_projection_tasks_completed_total( &self, backend: &str, instance: &str, kind: &str, )

Increment the completed projection task counter.
Source§

fn inc_projection_tasks_failed_total( &self, backend: &str, instance: &str, kind: &str, )

Increment the failed projection task counter.
Source§

fn observe_projection_lag_seconds( &self, backend: &str, instance: &str, kind: &str, seconds: f64, )

Observe the wall-clock lag between task creation and completion, in seconds.
Source§

fn inc_projection_reconciliation_repairs_total( &self, backend: &str, instance: &str, )

Increment the reconciliation repair counter.
Source§

fn set_projection_oldest_pending_age_seconds( &self, project: &str, backend: &str, instance: &str, kind: &str, age_seconds: f64, )

Set the current oldest pending task age for a (project, backend, instance, kind) group. Unlike observe_projection_lag_seconds, which only fires when a task completes, this gauge tracks the wall-clock age of the oldest still-PENDING/FAILED task — so operators see lag growing even when the worker is stalled or completion isn’t happening. Closes the U3 “projection lag visible per project/backend/resource” acceptance gate.

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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