pub struct MetricsController;Expand description
Prometheus metrics endpoint: GET /metrics.
Returns request counters and active-connection gauge in Prometheus
text exposition format (text/plain; version=0.0.4).
Implementations§
Source§impl MetricsController
impl MetricsController
pub fn is_matching_request(request: &Request) -> bool
pub fn process_request(_request: &Request, response: Response) -> Response
Trait Implementations§
Source§impl Controller for MetricsController
impl Controller for MetricsController
Source§fn is_matching(request: &Request, _connection: &ConnectionInfo) -> bool
fn is_matching(request: &Request, _connection: &ConnectionInfo) -> bool
Returns
true if this controller should handle the given request.
Called in declaration order; the first match wins.Auto Trait Implementations§
impl Freeze for MetricsController
impl RefUnwindSafe for MetricsController
impl Send for MetricsController
impl Sync for MetricsController
impl Unpin for MetricsController
impl UnsafeUnpin for MetricsController
impl UnwindSafe for MetricsController
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