Skip to content

v0.5.0

Choose a tag to compare

@puetzp puetzp released this 27 Mar 15:56
· 167 commits to master since this release

Changed

  • QueryResultType -> PromqlResult
  • JSON returned from /api/v1/alertmanagers is now parsed as Alertmanagers { active: Vec<Alertmanager>, dropped: Vec<Alertmanager> }
  • Selector::with -> Selector::eq
  • Selector::without -> Selector::ne
  • Selector::regex_match -> Selector::regex_eq
  • Selector::no_regex_match -> Selector::regex_ne
  • Target.scrape_interval from String to time::Duration
  • Target.scrape_timeout from String to time::Duration
  • Function signature of Client::query: from query(&self, vector: impl Display, time: Option<i64>, timeout: Option<&str>) to query(&self, query: impl ToString, time: Option<i64>, timeout: Option<i64>)
  • Function signature of Client::query_range: from query_range(&self, vector: impl Display, start: i64, end: i64, step: &str, timeout: Option<&str>) to query_range(&self, query: impl ToString, start: i64, end: i64, step: f64, timeout: Option<i64>)
  • Error::ResponseError -> Error::ApiError
  • Error::Reqwest -> Error::Client

Added

  • type Alertmanager that currently just wraps url::Url since this is the only item returned from the/api/v1/alertmanagers endpoint as yet.
  • Client::build_information returning BuildInformation
  • Client::runtime_information returning RuntimeInformation
  • convenience functions:
    • prometheus_http_query::query
    • prometheus_http_query::query_range
    • prometheus_http_query::series
    • prometheus_http_query::label_names
    • prometheus_http_query::label_values
    • prometheus_http_query::targets
    • prometheus_http_query::rules
    • prometheus_http_query::flags
    • prometheus_http_query::alertmanagers
    • prometheus_http_query::build_information
    • prometheus_http_query::runtime_information
    • prometheus_http_query::target_metadata
    • prometheus_http_query::metric_metadata

Removed

  • functions module, aggregations module, all Selector functionality that relates to gradual building of PromQL queries.
  • Obsolete variants of the Error enum