pub struct MetricsRegistry { /* private fields */ }Expand description
Registry of all remote-UDF metrics, owned by the registration handle.
Implementations§
Source§impl MetricsRegistry
impl MetricsRegistry
Sourcepub fn function_metrics(
&self,
service_id: &str,
function_name: &str,
) -> UdfMetrics
pub fn function_metrics( &self, service_id: &str, function_name: &str, ) -> UdfMetrics
Get (or create) the metrics handle for a (service, function) pair.
Sourcepub fn service_metrics(&self, service_id: &str) -> ServiceMetrics
pub fn service_metrics(&self, service_id: &str) -> ServiceMetrics
Get (or create) the per-service metrics handle.
Sourcepub fn to_prometheus(&self) -> String
pub fn to_prometheus(&self) -> String
Render every recorded metric in Prometheus text exposition format.
This is the export surface the observability stack scrapes; it is stable enough to snapshot-test. An empty registry renders an empty string.
Trait Implementations§
Source§impl Clone for MetricsRegistry
impl Clone for MetricsRegistry
Source§fn clone(&self) -> MetricsRegistry
fn clone(&self) -> MetricsRegistry
Returns a duplicate of the value. Read more
1.0.0 · 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 MetricsRegistry
impl Debug for MetricsRegistry
Source§impl Default for MetricsRegistry
impl Default for MetricsRegistry
Source§fn default() -> MetricsRegistry
fn default() -> MetricsRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetricsRegistry
impl RefUnwindSafe for MetricsRegistry
impl Send for MetricsRegistry
impl Sync for MetricsRegistry
impl Unpin for MetricsRegistry
impl UnwindSafe for MetricsRegistry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].