pub struct MetricsQueryParams {
pub name: String,
pub from: Option<DateTime<Utc>>,
pub to: Option<DateTime<Utc>>,
pub labels: Option<HashMap<String, String>>,
pub step: Option<String>,
pub agg: Option<String>,
pub group_by: Option<String>,
}Expand description
Parameters for query_metrics.
Fields§
§name: StringRequired. Metric name (e.g. pending_requests, kv_cache_usage).
from: Option<DateTime<Utc>>Start time (inclusive). Defaults to 1 hour before to.
to: Option<DateTime<Utc>>End time (inclusive). Defaults to now.
labels: Option<HashMap<String, String>>Label filter as a JSON object (JSONB containment).
step: Option<String>Downsample step: 1m, 5m, 1h, 1d. Default 1m.
agg: Option<String>Aggregation: avg, max, min, sum, last, p50, p90, p99. Default avg.
group_by: Option<String>Group results by a specific label key instead of the full label set.
Trait Implementations§
Source§impl Debug for MetricsQueryParams
impl Debug for MetricsQueryParams
Source§impl Default for MetricsQueryParams
impl Default for MetricsQueryParams
Source§fn default() -> MetricsQueryParams
fn default() -> MetricsQueryParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetricsQueryParams
impl<'de> Deserialize<'de> for MetricsQueryParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MetricsQueryParams
impl RefUnwindSafe for MetricsQueryParams
impl Send for MetricsQueryParams
impl Sync for MetricsQueryParams
impl Unpin for MetricsQueryParams
impl UnsafeUnpin for MetricsQueryParams
impl UnwindSafe for MetricsQueryParams
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