pub struct GatewayMetrics {
pub registry: Registry,
pub request_count: IntCounterVec,
pub request_duration: HistogramVec,
pub request_errors: IntCounterVec,
pub node_execution_count: IntCounterVec,
pub node_execution_duration: HistogramVec,
pub node_errors: IntCounterVec,
pub consumer_requests: IntCounterVec,
}Expand description
Global metrics registry for the gateway.
Owns a dedicated Prometheus [Registry] with all collectors
pre-registered. All collectors are internally thread-safe, so a single
instance is shared (behind an Arc) between the data-plane and the
Admin API.
Fields§
§registry: RegistryRegistry holding every collector below; gathered by Self::render.
request_count: IntCounterVecgateway_requests_total — requests by route, method, status.
request_duration: HistogramVecgateway_request_duration_seconds — end-to-end request latency
histogram per route (buckets 1ms to 5s).
request_errors: IntCounterVecgateway_request_errors_total — failed requests by route and
error_code.
node_execution_count: IntCounterVecgateway_node_executions_total — graph node executions by policy,
node_id, node_type.
node_execution_duration: HistogramVecgateway_node_duration_seconds — per-node execution latency
histogram by policy and node_id (buckets 0.1ms to 500ms).
node_errors: IntCounterVecgateway_node_errors_total — node failures by policy, node_id,
error_code.
consumer_requests: IntCounterVecgateway_consumer_requests_total — requests attributed to an
authenticated consumer, by route (parity with APISIX’s prometheus
per-consumer counter). Recorded by the prometheus node, which must be
placed after the auth node that attaches the consumer.
Implementations§
Source§impl GatewayMetrics
impl GatewayMetrics
Auto Trait Implementations§
impl Freeze for GatewayMetrics
impl !RefUnwindSafe for GatewayMetrics
impl Send for GatewayMetrics
impl Sync for GatewayMetrics
impl Unpin for GatewayMetrics
impl UnsafeUnpin for GatewayMetrics
impl !UnwindSafe for GatewayMetrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
§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>
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>
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