pub struct PrometheusMetrics { /* private fields */ }Implementations§
Source§impl PrometheusMetrics
impl PrometheusMetrics
pub fn new() -> Result<Self, Error>
pub fn record_grpc(&self, method: &str, status: &str, seconds: f64)
pub fn observe_pg_query(&self, op: &str, table: &str, seconds: f64)
pub fn inc_cache_op(&self, op: &str, hit: bool)
pub fn inc_vector_op(&self, collection: &str, op: &str)
pub fn inc_object_op(&self, bucket: &str, method: &str)
pub fn gather_text(&self, extra: &str) -> String
pub fn inc_channel_inflight(&self, channel: &str)
pub fn dec_channel_inflight(&self, channel: &str)
pub fn inc_channel_rejected(&self, channel: &str)
pub fn inc_channel_timeout(&self, channel: &str)
pub fn observe_channel_latency(&self, channel: &str, seconds: f64)
pub fn record_fair_admission( &self, project: &str, tenant_hash: &str, backend: &str, instance: &str, operation: &str, result: &str, )
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
impl Clone for PrometheusMetrics
Source§fn clone(&self) -> PrometheusMetrics
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrometheusMetrics
impl Debug for PrometheusMetrics
Source§impl MetricsRecorder for PrometheusMetrics
impl MetricsRecorder for PrometheusMetrics
fn record_grpc(&self, method: &str, status: &str, seconds: f64)
fn observe_pg_query(&self, op: &str, table: &str, seconds: f64)
fn inc_cache_op(&self, op: &str, hit: bool)
fn inc_vector_op(&self, collection: &str, op: &str)
fn inc_object_op(&self, bucket: &str, method: &str)
fn inc_channel_inflight(&self, channel: &str)
fn dec_channel_inflight(&self, channel: &str)
fn inc_channel_rejected(&self, channel: &str)
fn inc_channel_timeout(&self, channel: &str)
fn observe_channel_latency(&self, channel: &str, seconds: f64)
fn record_fair_admission( &self, project: &str, tenant_hash: &str, backend: &str, instance: &str, op: &str, status: &str, )
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)
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)
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)
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)
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)
fn inc_lint_warnings(&self, kind: &str)
Increment the lint warning counter. Read more
Source§fn observe_run_duration(&self, status: &str, seconds: f64)
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)
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).
fn set_cdc_is_leader(&self, host: &str, is_leader: bool)
fn inc_cdc_wal_messages_received_total(&self)
fn inc_cdc_events_published_total(&self, topic: &str)
fn inc_cdc_errors_total(&self, reason: &str)
fn set_cdc_lag_seconds(&self, seconds: f64)
fn set_cdc_outbox_depth(&self, depth: i64)
fn set_cdc_dlq_depth(&self, depth: i64)
fn observe_cdc_publish_duration_seconds(&self, seconds: f64)
fn inc_cdc_dlq_replayed_total(&self)
fn inc_cdc_duplicate_skipped_total(&self)
Source§fn set_saga_active(&self, count: i64)
fn set_saga_active(&self, count: i64)
Set the current count of active (IN_PROGRESS) sagas.
Source§fn inc_saga_compensated_total(&self)
fn inc_saga_compensated_total(&self)
Increment the count of sagas that reached COMPENSATED terminal state.
Source§fn inc_saga_failed_compensations_total(&self)
fn inc_saga_failed_compensations_total(&self)
Increment the count of compensation actions that failed.
Source§fn observe_saga_duration_seconds(&self, seconds: f64)
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,
)
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,
)
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,
)
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,
)
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,
)
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,
)
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§
impl !RefUnwindSafe for PrometheusMetrics
impl !UnwindSafe for PrometheusMetrics
impl Freeze for PrometheusMetrics
impl Send for PrometheusMetrics
impl Sync for PrometheusMetrics
impl Unpin for PrometheusMetrics
impl UnsafeUnpin for PrometheusMetrics
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.