Skip to content

Conversation

@mimir-github-bot
Copy link
Contributor

@mimir-github-bot mimir-github-bot bot commented Dec 1, 2025

Merge from prometheus/prometheus

This PR was automatically created by the merge-upstream-prometheus workflow

Details:

Changes:

This PR merges the latest changes from the upstream prometheus/prometheus main branch.


Note

Adds native histogram metrics for key durations across engine/rules/SD/scrape, improves PromQL editor duration autocomplete, introduces explicit duplicate labelset errors, and tweaks README build instructions.

  • Metrics (native histograms):
    • Add *_histogram_seconds for durations:
      • promql engine: query_duration_histogram_seconds for queue/prepare/inner_eval/result_sort; observe in code paths.
      • Rules: rule_evaluation_duration_histogram_seconds, rule_group_duration_histogram_seconds; observe on eval/iteration.
      • Service Discovery refresh: prometheus_sd_refresh_duration_histogram_seconds; observe on refresh.
      • Scrape: prometheus_target_sync_length_histogram_seconds, prometheus_target_interval_length_histogram_seconds; register/unregister and observe.
  • PromQL UI (CodeMirror):
    • Prevent duration autocompletion when a unit already exists; export durationWithUnitRegexp; extend tests.
  • Rules:
    • Introduce ErrDuplicateAlertLabelSet and ErrDuplicateRecordingLabelSet; update tests to use require.ErrorIs.
  • Discovery/Refresh:
    • Track refresh duration via new histogram in discovery.RefreshMetrics and observe on each refresh.
  • Docs:
    • README: simplify go install command (remove GO111MODULE=on).

Written by Cursor Bugbot for commit 4337971. This will update automatically on new commits. Configure here.

ADITYATIWARI342005 and others added 12 commits November 24, 2025 18:03
- No duration unit suggestions shown if a valid unit follows the digit (e.g. , )
- Adds related test cases

Signed-off-by: ADITYA TIWARI <[email protected]>
Refactor duration regex to match complete durations with units.

Signed-off-by: ADITYA TIWARI <[email protected]>
Added tests for durationWithUnitRegexp to validate matching of complete durations with units and ensure non-matching cases are correctly identified.

Signed-off-by: ADITYA TIWARI <[email protected]>
…d compound duration test cases

Signed-off-by: ADITYA TIWARI <[email protected]>
Removed polyfill for RegExp.escape and updated duration regex.

Signed-off-by: ADITYA TIWARI <[email protected]>
…maries (#17374)

This adds the following native histograms (with a few classic buckets for backwards compatibility), while keeping the corresponding summaries (same name, just without `_histogram`):

- `prometheus_sd_refresh_duration_histogram_seconds`
- `prometheus_rule_evaluation_duration_histogram_seconds`
- `prometheus_rule_group_duration_histogram_seconds`
- `prometheus_target_sync_length_histogram_seconds`
- `prometheus_target_interval_length_histogram_seconds`
- `prometheus_engine_query_duration_histogram_seconds`

Signed-off-by: Harsh <[email protected]>
Signed-off-by: harsh kumar <[email protected]>
Co-authored-by: Björn Rabenstein <[email protected]>
This is ignored as of go 1.17, see e.g., for reference
https://go.dev/blog/go116-module-changes

Signed-off-by: Solomon Jacobs <[email protected]>
[BUGFIX] UI :Suppress duration unit autocomplete when unit already present in query selector
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 6 committers have signed the CLA.

✅ NickAnge
❌ ADITYATIWARI342005
❌ hxrshxz
❌ juliusv
❌ mimir-github-bot[bot]
❌ SoloJacobs
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@mimir-vendoring mimir-vendoring bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this upstream merge PR.
This PR merges changes from prometheus/prometheus upstream repository.
Related GitHub action is defined here.

@mimir-vendoring mimir-vendoring bot enabled auto-merge December 1, 2025 02:50
@mimir-vendoring mimir-vendoring bot merged commit e50e747 into main Dec 1, 2025
31 of 32 checks passed
@mimir-vendoring mimir-vendoring bot deleted the bot/main/merge-upstream-main-202512010249 branch December 1, 2025 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants