Expand description
prom supply the prometheus HTTP API Server compliance
MacrosΒ§
- try_
call_ πreturn_ response - Helper macro which try to evaluate the expression and return its results.
If the evaluation fails, return a
PrometheusJsonResponse
early.
StructsΒ§
- Build
Info Query - Format
Query - Instant
Query - Label
Value Query - Labels
Query - Matches π
- Parse
Query - Prom
Data - Prom
Series Matrix - For [ValueType::Matrix] result type
- Prom
Series Vector - For [ValueType::Vector] result type
- Prometheus
Json Response - Range
Query - Series
Query
EnumsΒ§
- Prom
Query Result - Variants corresponding to [ValueType]
- Prometheus
Response
FunctionsΒ§
- build_
info_ query - do_
instant_ πquery - Executes a single instant query and returns response
- do_
range_ πquery - Executes a single range query and returns response
- find_
metric_ πname_ and_ matchers - find_
metric_ πname_ not_ equal_ matchers - Try to find the
__name__
matchers which op is notMatchOp::Equal
. - format_
query - get_
all_ πcolumn_ names - Get all tag column name of the given schema
- get_
catalog_ πschema - Tries to get catalog and schema from an optional db param. And retrieves them from QueryContext if they donβt present.
- instant_
query - label_
values_ query - labels_
query - parse_
query - promql_
expr_ πto_ metric_ name - range_
query - record_
batches_ πto_ labels_ name - Retrieve labels name from record batches
- record_
batches_ πto_ series - retrieve_
field_ πnames - retrieve_
labels_ πname_ from_ query_ result - Retrieve labels name from query result
- retrieve_
metric_ πname_ and_ result_ type - retrieve_
metric_ πname_ from_ promql - Try to parse and extract the name of referenced metric from the promql query.
- retrieve_
series_ πfrom_ query_ result - series_
query - take_
metric_ πname - Take metric name from the [VectorSelector]. It takes the name in the selector or removes the name matcher.
- try_
update_ πcatalog_ schema - Update catalog and schema in QueryContext if necessary.
- update_
metric_ πname_ matcher - Update the
__name__
matchers in expression into special value Returns the updated expression.