Skip to content

Releases: puetzp/prometheus-http-query

v0.3.2

22 Jan 12:57

Choose a tag to compare

Added

  • Implement Clone for Client so it does not need to be wrapped into Arc (the underlying reqwest::Client already uses Arc internally)
  • Implement Debug and Display for Scheme

Changed

  • Bump dependency time to v0.3.6

v0.3.1

30 Dec 13:01

Choose a tag to compare

Changed

  • Update time to v0.3

Added

  • Add present_over_time function available from Prometheus v2.29.0
  • Parse additional fields as returned by Client::targets

v0.3.0

10 Jul 13:31

Choose a tag to compare

Changed

  • Remove the Response type.
  • Rename response::Group to response::RuleGroup
  • Rename Client::labels() -> Client::label_names()
  • Deserialize scrapeUrl and globalUrl in a target as url::Url instead of String; Target::scrape_url() and Target::global_url() now return &Urls
  • Deserialize lastScrape (target) and activeAt (alert) as time::OffsetDateTime instead of String; Target::last_scrape() and Alert::active_at() now return &OffsetDateTimes
  • Client::query() and Client::query_range() now return a QueryResultType enum with Variants Vector and Matrix that encapsulate a vector of InstantVectors and RangeVectors respectively.
  • all other Client methods' response types are not wrapped into Response anymore as the return type of these methods is fixed.
  • Rename error::UnsupportedResponseDataType to UnsupportedQueryResultType that is only thrown when a expression query result cannot be parsed as QueryResultType.

Added

  • Client::flags() to retrieve flags that Prometheus was configured with.
  • Client::alertmanagers() to retrieve current alertmanager discovery status.
  • Client::target_metadata() to retrieve metric metadata along with target information.
  • Client::metric_metadata() to retrieve metric metadata.
  • error::ResponseParse as generic wrapper around serde_json::Error.
  • error::MissingField to avoid panics when API response (for whatever reason) does not contain documented and thus expected fields.

Some convenience methods to retrieve the expected type of data from a QueryResultType:

  • QueryResultType.as_instant()
  • QueryResultType.as_range()

v0.2.3

19 Jun 18:50

Choose a tag to compare

Added

  • Add methods to Client to retrieve recording/alerting rules and active alerts

Changed

  • Some transparent code style changes

v0.2.2

18 Jun 12:25

Choose a tag to compare

Added

  • client.targets() method to retrieve currently active/dropped targets

v0.2.1

17 Jun 15:37

Choose a tag to compare

Added methods to query metadata (series and labels)

v0.2.0

17 Jun 09:51

Choose a tag to compare

Mod readme