pub struct PrometheusMetrics {
pub registry: Registry,
/* private fields */
}
Expand description
By default two metrics are tracked (this assumes the namespace actix_web_prom
):
-
actix_web_prom_http_requests_total
(labels: endpoint, method, status): the total number of HTTP requests handled by the actixHttpServer
. -
actix_web_prom_http_requests_duration_seconds
(labels: endpoint, method, status): the request duration for all HTTP requests handled by the actixHttpServer
.
Fields§
§registry: Registry
exposed registry for custom prometheus metrics
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S, B> Transform<S, ServiceRequest> for PrometheusMetrics
impl<S, B> Transform<S, ServiceRequest> for PrometheusMetrics
Source§type Response = ServiceResponse<EitherBody<StreamLog<B>, StreamLog<String>>>
type Response = ServiceResponse<EitherBody<StreamLog<B>, StreamLog<String>>>
Responses produced by the service.
Source§type Transform = PrometheusMetricsMiddleware<S>
type Transform = PrometheusMetricsMiddleware<S>
The
TransformService
value created by this factorySource§type Future = Ready<Result<<PrometheusMetrics as Transform<S, ServiceRequest>>::Transform, <PrometheusMetrics as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<PrometheusMetrics as Transform<S, ServiceRequest>>::Transform, <PrometheusMetrics as Transform<S, ServiceRequest>>::InitError>>
The future response value.
Source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl Freeze for PrometheusMetrics
impl !RefUnwindSafe for PrometheusMetrics
impl Send for PrometheusMetrics
impl Sync for PrometheusMetrics
impl Unpin for PrometheusMetrics
impl !UnwindSafe for PrometheusMetrics
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