Releases: puetzp/prometheus-http-query
Releases · puetzp/prometheus-http-query
v0.3.2
v0.3.1
v0.3.0
Changed
- Remove the
Responsetype. - Rename
response::Grouptoresponse::RuleGroup - Rename
Client::labels()->Client::label_names() - Deserialize scrapeUrl and globalUrl in a target as
url::Urlinstead ofString;Target::scrape_url()andTarget::global_url()now return&Urls - Deserialize lastScrape (target) and activeAt (alert) as
time::OffsetDateTimeinstead ofString;Target::last_scrape()andAlert::active_at()now return&OffsetDateTimes Client::query()andClient::query_range()now return aQueryResultTypeenum with VariantsVectorandMatrixthat encapsulate a vector ofInstantVectors andRangeVectors respectively.- all other
Clientmethods' response types are not wrapped intoResponseanymore as the return type of these methods is fixed. - Rename
error::UnsupportedResponseDataTypetoUnsupportedQueryResultTypethat is only thrown when a expression query result cannot be parsed asQueryResultType.
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::ResponseParseas generic wrapper aroundserde_json::Error.error::MissingFieldto 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()