Skip to content

Releases: puetzp/prometheus-http-query

v0.6.2

23 Aug 15:28
Compare
Choose a tag to compare

v0.6.1

22 Aug 20:43
Compare
Choose a tag to compare

v0.6.0

01 Aug 19:44
Compare
Choose a tag to compare

Have a look at the CHANGELOG

v0.5.2

06 Jul 14:03
Compare
Choose a tag to compare

Internal changes only

v0.5.1

29 Mar 19:21
Compare
Choose a tag to compare

Added

  • Client::wal_replay_statistics
  • Client::tsdb_statistics

v0.5.0

27 Mar 15:56
Compare
Choose a tag to compare

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

v0.4.2

18 Mar 15:57
Compare
Choose a tag to compare

Added

  • #[derive(Clone)] on all types in the response module, see #2.

v0.4.1

16 Mar 16:04
Compare
Choose a tag to compare

Changed

  • Aligned validation of time duration with the go implementation (e.g. the total value in nanoseconds must not exceed i64::MAX)

v0.4.0

09 Feb 21:03
Compare
Choose a tag to compare

Added

  • Create a Client from a string literal via Client::from_str() or Client::try_from(), from a String via Client::try_from().
  • Add trigonometric functions.
  • Add QueryResultType::Scalar.

Changed

  • Repurpose Client::from() to create a Client from a custom-built reqwest::Client plus a base URL, so authentication, proxy settings etc. may be customized by the user.
  • Selector::metric() is not fallible anymore. Metric names that equal reserved Prometheus keywords like "on" can now be queried.

Removed

  • Client::new()
  • Error::IllegalMetricName

Fixed

  • As yet prometheus_http_query::functions::scalar could not possibly return a result. An error would be thrown inevitably. The query result will now correctly be a QueryResultType::Scalar(Sample) that can be extracted by QueryResultType::as_scalar().

v0.3.3

24 Jan 13:23
Compare
Choose a tag to compare

Added

  • Add Client::from(url: &str)