pub struct Metrics {
pub registry: Registry,
/* private fields */
}Fields§
§registry: RegistryImplementations§
Source§impl Metrics
impl Metrics
pub fn new() -> Self
Sourcepub fn record_request(&self, kind: &str, result: &str, repo: &str)
pub fn record_request(&self, kind: &str, result: &str, repo: &str)
Record the outcome of a client request. repo is the served repo path on
success and - on any failure, so unbounded client-supplied paths cannot
inflate label cardinality. kind is info_refs, upload_pack, auth or
receive_pack; result is ok, error, upstream_error,
unauthorized or rejected.
Sourcepub fn record_upstream(&self, op: &str, result: &str, repo: &str)
pub fn record_upstream(&self, op: &str, result: &str, repo: &str)
Record an upstream clone/fetch. Errors are recorded too (result = "error"); pass the repo path on success and - on error, matching
record_request.
pub fn gather(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Metrics
impl !UnwindSafe for Metrics
impl Freeze for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
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