pub struct SeriesQueryBuilder { /* private fields */ }Expand description
Provides methods to build a query to the series endpoint and send it to Prometheus.
Implementations§
Source§impl SeriesQueryBuilder
Note that Prometheus combines all filters that have been set in the final request
and only returns series that matches all filters.
See the official documentation for a thorough explanation on the filters that can
be set: Prometheus API documentation.
impl SeriesQueryBuilder
Note that Prometheus combines all filters that have been set in the final request
and only returns series that matches all filters.
See the official documentation for a thorough explanation on the filters that can
be set: Prometheus API documentation.
Sourcepub fn match_many<T>(self, selectors: T) -> Self
pub fn match_many<T>(self, selectors: T) -> Self
Add series selectors that tell Prometheus which series to return. This can
be used multiple times to extend the set of series selectors.
At least one selector must be provided.
This corresponds to setting the match[] query parameter repeatedly.
Sourcepub fn match_one(self, selector: impl Display) -> Self
pub fn match_one(self, selector: impl Display) -> Self
Add a series selector that tells Prometheus which series to return. This can
be used multiple times to extend the set of series selectors.
At least one selector must be provided.
This corresponds to setting the match[] query parameter once.
Sourcepub fn start(self, start: i64) -> Self
pub fn start(self, start: i64) -> Self
Limit the amount of metadata returned by setting a start time
(UNIX timestamp in seconds).
Calling this repeatedly will replace the current setting.
Sourcepub fn end(self, end: i64) -> Self
pub fn end(self, end: i64) -> Self
Limit the amount of metadata returned by setting an end time
(UNIX timestamp in seconds).
Calling this repeatedly will replace the current setting.
Sourcepub fn limit(self, limit: i64) -> Self
pub fn limit(self, limit: i64) -> Self
Set maximum number of returned series. 0 means disabled.