Skip to content

v0.4.0

Choose a tag to compare

@puetzp puetzp released this 09 Feb 21:03
· 211 commits to master since this release

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().