Skip to content

Comments

WIP: Add /api/v1/info_labels endpoint for PromQL info() autocomplete#14168

Draft
aknuds1 wants to merge 1 commit intomainfrom
arve/info-autocomplete
Draft

WIP: Add /api/v1/info_labels endpoint for PromQL info() autocomplete#14168
aknuds1 wants to merge 1 commit intomainfrom
arve/info-autocomplete

Conversation

@aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Jan 26, 2026

What this PR does

Adds a new /api/v1/info_labels API endpoint that returns data labels from info metrics (like target_info) for use in autocomplete suggestions for the PromQL info() function. Mimir port of prometheus/prometheus#17930, which is also work in progress.

Key changes:

  • New /api/v1/info_labels endpoint in the querier that queries store-gateways and ingesters
  • Query frontend caching support with separate cache prefix (il:)
  • Integration tests for the new endpoint
  • Vendored Prometheus changes to expose the info labels API

Which issue(s) this PR fixes or relates to

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • about-versioning.md updated with experimental features.

Port the /api/v1/info_labels endpoint from mimir-prometheus to enable
autocomplete suggestions for the PromQL info() function. This endpoint
returns data labels from info metrics (like target_info).

The endpoint is routed through the labels middleware for caching,
validation, and retry behavior consistent with other label queries.

Changes:
- Update mimir-prometheus dependency to arve/info-autocomplete branch
- Register /api/v1/info_labels route in API and handlers
- Add IsInfoLabelsQuery() detection in query frontend middleware
- Handle info_labels in codec's DecodeLabelsSeriesQueryRequest
- Add comprehensive test coverage

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1 aknuds1 force-pushed the arve/info-autocomplete branch from b3eb28f to 06b0c53 Compare January 26, 2026 09:02
@aknuds1 aknuds1 changed the title Add /api/v1/info_labels endpoint for PromQL info() autocomplete WIP: Add /api/v1/info_labels endpoint for PromQL info() autocomplete Jan 26, 2026
@aknuds1 aknuds1 added the enhancement New feature or request label Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant