proposal: add info-metric label discovery APIs for info() autocomplete - #85
Conversation
ab1b9ec to
6bf4a84
Compare
|
I've implemented a PoC in From PoC stand point it's working nicely. But we should challenge the return value data type (instead of returning all potential labels/values we might return labels and then values for the selected label. In simple terms I'd like to follow current |
1cb8122 to
8a7dc22
Compare
8a7dc22 to
ebb9e87
Compare
37ac590 to
ab6ea6e
Compare
ab6ea6e to
11a8be7
Compare
@itsmylife This dual-endpoint scheme has been implemented. Thanks for the feedback! |
11a8be7 to
477232b
Compare
477232b to
84ad643
Compare
|
I would keep the endpoint behind /search. /search was meant partly for autocomplete, so it would be a fit. Also we could reuse some of the code and ensure some consistency between the endpoints. I have no strong opinion about reusing endpoints with Note that we have also defined semantics that might be useful here, such as |
Thanks @roidelapluie - done!
Included a note on this. |
|
Approved. I’d like it to remain experimental until we have a clearer picture of performance under realistic autocomplete usage. I suggest reusing the search-api toggle, with two separate entries in /api/v1/features for general search and info-label search, so clients can distinguish support for each. |
|
Thanks @roidelapluie! |
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Document the request profiles and client requirements learned from the Grafana info() autocomplete proof of concept. Clarify expression interpolation, response bounds, and terminal NDJSON handling. Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
9c63b1e to
3f6b1a6
Compare
Editors completing
info(<expr>, {…})need data-label names and values from info metrics scoped to the expression being edited. This proposal adds two dedicated Search API operations:GET|POST /api/v1/search/info_labelssearches non-identifying data-label names.GET|POST /api/v1/search/info_label_valuessearches values for one exactlabel.Both endpoints accept repeated full
data_match[]matchers, including__name__matchers selecting info metric families, and an optional instant-vectorexpr. Expression-derived storage selection follows the lookback,offset, and@semantics of an instantinfo()evaluation.The design builds on PROM-74, reusing the Search API’s storage interfaces, search, ranking, and NDJSON streaming infrastructure. Dedicated routes keep their info-specific scoping and expression-dependent time semantics explicit.
Both require
search-apiandpromql-experimental-functions. A single per-request timeout covers expression evaluation and storage search. Requests containingexprrequire the same authorization as/api/v1/query.The proposal defines result limits, expression-derived matcher bounds, fail-closed storage capability checks, and stream completion, warning, and truncation semantics. Suggestions are indexed candidates and do not guarantee a successful runtime join.
Work-in-progress implementation: prometheus/prometheus#17930.