mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-31 15:43:52 -08:00
de16f5e387
The `info` function is an experiment to improve UX around including labels from info metrics. `info` has to be enabled via the feature flag `--enable-feature=promql-experimental-functions`. This MVP of info simplifies the implementation by assuming: * Only support for the target_info metric * That target_info's identifying labels are job and instance Also: * Encode info samples' original timestamp as sample value * Deduce info series select hints from top-most VectorSelector --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Ying WANG <ying.wang@grafana.com> Co-authored-by: Augustin Husson <augustin.husson@amadeus.com> Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com> Co-authored-by: Björn Rabenstein <github@rabenste.in> Co-authored-by: Bryan Boreham <bjboreham@gmail.com> |
||
---|---|---|
.. | ||
src | ||
test | ||
.gitignore | ||
.npmignore | ||
build.sh | ||
generate-types.sh | ||
jest.config.cjs | ||
package.json | ||
README.md | ||
rollup.config.js |
lezer-promql
Overview
This is a PromQL grammar for the lezer parser system. It is inspired by the initial grammar coming from Prometheus written in yacc.
This library is stable but doesn't provide any guideline of how to use it as it has been integrated into codemirror-promql. If you want to use this library, you perhaps want to actually use @prometheus-io/codemirror-promql instead.
Note: This library is a lezer-based implementation of the authoritative, goyacc-based PromQL grammar. Any changes to the authoritative grammar need to be reflected in this package as well.
Installation
This package is available as an npm package:
npm install --save @prometheus-io/lezer-promql
Note: you will have to manually install the lezer
dependencies as it is a peer dependency to this package.
npm install --save @lezer/lr @lezer/highlight
Development
Building
npm i
npm run build
Testing
npm run test
License
The code is licensed under an Apache 2.0 license.