Skip to content

Prometheus labels/series APIs: support multiple match[] selectors#145298

Merged
felixbarny merged 3 commits intoelastic:mainfrom
felixbarny:prometheus-api-multi-matcher
Mar 31, 2026
Merged

Prometheus labels/series APIs: support multiple match[] selectors#145298
felixbarny merged 3 commits intoelastic:mainfrom
felixbarny:prometheus-api-multi-matcher

Conversation

@felixbarny
Copy link
Copy Markdown
Member

Summary

  • Re-parses the raw URI via RequestParams.fromUri to capture all repeated match[] values, working around the current limitation where request processing keeps only the last value for repeated parameters (to be fixed in Preserve multi-value request params through PathTrie iteration #145223).
  • Calls repeatedParamAsList to mark the parameter as consumed so Elasticsearch does not reject the request as having unrecognized params.
  • Adds IT test cases for all three endpoints (labels, label values, series) that send two match[] selectors and assert only matched series contribute to the response, including a decoy metric to verify non-matching series are excluded.

Re-parses the raw URI via RequestParams.fromUri to capture all repeated
match[] values, working around the current limitation where request
processing keeps only the last value for repeated parameters (tracked in
elastic#145223).

Also calls repeatedParamAsList to mark the parameter as consumed so
Elasticsearch does not reject the request as having unrecognized params.

Adds IT test cases for all three endpoints (labels, label values, series)
that send two match[] selectors and verify only the matched series
contribute to the response.
@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v9.4.0 needs:triage Requires assignment of a team area label labels Mar 31, 2026
@felixbarny felixbarny self-assigned this Mar 31, 2026
@felixbarny felixbarny added >non-issue :StorageEngine/PromQL PromQL support for Elastic labels Mar 31, 2026
@felixbarny felixbarny requested a review from kkrik-es March 31, 2026 09:10
@elasticsearchmachine elasticsearchmachine added Team:StorageEngine and removed needs:triage Requires assignment of a team area label labels Mar 31, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@felixbarny felixbarny enabled auto-merge (squash) March 31, 2026 10:29
@felixbarny felixbarny merged commit 7f25e5c into elastic:main Mar 31, 2026
40 checks passed
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 31, 2026
…rics

* upstream/main: (428 commits)
  ESQL: DS: Add inference/RERANK tests (elastic#145229)
  Unmute MMR logical plan test (elastic#145311)
  Do not attempt marking store as corrupted if the check is rejected due to shutdown (elastic#145209)
  feat(tsdb): add pipeline runtime and rename stage interfaces (elastic#145175)
  Fix UnresolvedException on PromQL by(step) grouping (elastic#145307)
  ES|QL: Optimize MMR by reducing cache size and lookup (elastic#145014)
  Prometheus labels/series APIs: support multiple match[] selectors (elastic#145298)
  Move ClientScrollablePaginatedHitSource into Reindex Module (elastic#144100)
  mute test class for elastic#145277
  CPS mode for ViewResolver (elastic#145219)
  [ESQL] Disables GroupedTopNBenchmark temporarily (elastic#145124)
  Make exponential_histogram the default histogram type for HTTP OTLP endpoint (elastic#145065)
  More tests requiring an explicit confidence interval (elastic#145232)
  ES|QL: Adding `USER_AGENT` command (elastic#144384)
  ESQL: enable Generative IT after more fixes (elastic#145112)
  Rework FieldMapper parameter tests to not use merge builders (elastic#145213)
  [ESQL] Fix ORC type support gaps (elastic#145074)
  [Test] Unmute FollowingEngineTests.testProcessOnceOnPrimary (elastic#145192)
  Add PrometheusSeriesRestAction for /_prometheus/api/v1/series endpoint (elastic#144494)
  Prometheus labels API: add rest action (elastic#144952)
  ...
ncordon pushed a commit to ncordon/elasticsearch that referenced this pull request Apr 1, 2026
…astic#145298)

Re-parses the raw URI via RequestParams.fromUri to capture all repeated
match[] values, working around the current limitation where request
processing keeps only the last value for repeated parameters (tracked in
elastic#145223).

Also calls repeatedParamAsList to mark the parameter as consumed so
Elasticsearch does not reject the request as having unrecognized params.

Adds IT test cases for all three endpoints (labels, label values, series)
that send two match[] selectors and verify only the matched series
contribute to the response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor Pull request authored by a developer outside the Elasticsearch team >non-issue :StorageEngine/PromQL PromQL support for Elastic Team:StorageEngine v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants