pub struct PrometheusMetrics {Show 16 fields
pub queries_total: u64,
pub queries_success: u64,
pub queries_error: u64,
pub queries_avg_duration_ms: f64,
pub db_queries_total: u64,
pub db_queries_avg_duration_ms: f64,
pub validation_errors_total: u64,
pub parse_errors_total: u64,
pub execution_errors_total: u64,
pub http_requests_total: u64,
pub http_responses_2xx: u64,
pub http_responses_4xx: u64,
pub http_responses_5xx: u64,
pub cache_hits: u64,
pub cache_misses: u64,
pub cache_hit_ratio: f64,
}Expand description
Prometheus metrics output format.
Fields§
§queries_total: u64Total GraphQL queries executed
queries_success: u64Successful GraphQL queries
queries_error: u64Failed GraphQL queries
queries_avg_duration_ms: f64Average query duration in milliseconds
db_queries_total: u64Total database queries executed
db_queries_avg_duration_ms: f64Average database query duration in milliseconds
validation_errors_total: u64Total validation errors
parse_errors_total: u64Total parse errors
execution_errors_total: u64Total execution errors
http_requests_total: u64Total HTTP requests processed
http_responses_2xx: u64HTTP 2xx responses
http_responses_4xx: u64HTTP 4xx responses
http_responses_5xx: u64HTTP 5xx responses
cache_hits: u64Cache hit count
cache_misses: u64Cache miss count
cache_hit_ratio: f64Cache hit ratio (0.0 to 1.0)
Implementations§
Source§impl PrometheusMetrics
impl PrometheusMetrics
Sourcepub fn to_prometheus_format(&self) -> String
pub fn to_prometheus_format(&self) -> String
Generate Prometheus text format output.
Trait Implementations§
Source§impl Debug for PrometheusMetrics
impl Debug for PrometheusMetrics
Source§impl From<&MetricsCollector> for PrometheusMetrics
impl From<&MetricsCollector> for PrometheusMetrics
Source§fn from(collector: &MetricsCollector) -> Self
fn from(collector: &MetricsCollector) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PrometheusMetrics
impl RefUnwindSafe for PrometheusMetrics
impl Send for PrometheusMetrics
impl Sync for PrometheusMetrics
impl Unpin for PrometheusMetrics
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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