Skip to content

Conversation

@mimir-github-bot
Copy link
Contributor

@mimir-github-bot mimir-github-bot bot commented Nov 17, 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

Renames “created timestamp zero ingestion” to “start timestamp” across ingestion/remote/OTLP, unifies SD constructors via DiscovererOptions with config-aware metrics, optimizes PromQL vector matching, refines remote-write batching/metrics, adjusts docs, and adds safety/bug fixes.

  • Ingestion & APIs:
    • Rename created timestamp (CT) to start timestamp (ST) zero ingestion across storage, scrape, remote-write, OTLP, errors, and tests; update feature flag/docs.
  • Service Discovery:
    • Standardize NewDiscoverer to accept DiscovererOptions (logger, metrics, HTTP options, SetName); propagate SetName.
    • Refresh metrics now include config label; tests updated accordingly.
  • Refresh/Manager:
    • refresh.Options gains SetName; RefreshMetrics.Instantiate(mech, setName).
  • PromQL:
    • Optimize vector matching using signature ordinals instead of strings; improve name-label dropping behavior.
  • Remote write / OTLP:
    • Combined appender supports optional metadata WAL appends; switch to ST handling; refactor batch metrics/spans and time-series age checks.
  • Docs & Metrics:
    • Update feature flag text and HTTP SD metrics naming/details.
  • Safety & Misc:
    • Add bounds checks in head chunk reader; skip flaky test; minor test and API wiring updates.

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

bboreham and others added 30 commits September 2, 2025 14:51
`collectResultAppender` on its own will now use the labels hash
instead of a random number. This avoids the situation where a series
could be added twice under different references.

When there is an underlying appender, use the reference it generates.

Signed-off-by: Bryan Boreham <[email protected]>
Instead of the labels hash, which could collide between two different
series, use the SeriesRef which is unique.

Signed-off-by: Bryan Boreham <[email protected]>
This was added in Go 1.21, and is neater than a loop deleting all
elements.

Also move the comment noting why we do this, because it could be read
as saying this is the only reason we have two maps.

Signed-off-by: Bryan Boreham <[email protected]>
Adds a `config` label (similar to `prometheus_sd_discovered_targets`) to
refresh metrics to help identify the source of refresh issues or
performance stats. In particular for HTTP SD, it can be common to have
multiple disparate HTTP SD sources that should be identified and not
lumped together. For example if one HTTP SD service has failures, that
should be evident in its own time series seperate from other HTTP SD
sources.

`config` seemed more appropriate than `endpoint` as a general standard
for `prometheus_sd` metrics.

Docs were also updated for HTTP SD to point at the new refresh metrics
rather than the older metrics.

Signed-off-by: Will Bollock <[email protected]>
100,000 matchers is not something that could happen while using Prometheus.

Signed-off-by: Bryan Boreham <[email protected]>
Extract functions which pre-create all the memory for the benchmark itself.

Signed-off-by: Bryan Boreham <[email protected]>
It is fairly common that the next item is the one we want, and cheap
to check.

We could also start the binary search one position on, but strangely
that slows it down.

Signed-off-by: Bryan Boreham <[email protected]>
Check if the next position is already a match, in which case we don't
have to call `Seek`.

Signed-off-by: Bryan Boreham <[email protected]>
…(#17131)

In this PR, we are eliminating expensive string-keyed (by signature) maps that are accessed for every sample processed. During preprocessing in rangeEval, we assign a unique number from 0 to n-1 to each of the n string signature values, and later only use this number as a label set signature.

Signed-off-by: Linas Medžiūnas <[email protected]>
Co-authored-by: George Krajcsovits <[email protected]>
Signed-off-by: Charles Korn <[email protected]>
Co-authored-by: Charles Korn <[email protected]>
[PERF] PromQL: Only look up operation name if we need it
…feature is enabled (#17472)

OTLP Receiver: Only update metadata to WAL when metadata-wal-records feature is enabled.

---------

Signed-off-by: pipiland2612 <[email protected]>
…g_label

feat(metrics): add config label to refresh metrics
Refactor part of queue_manger.go by creating struct to reuse some common function
Partially fixes prometheus/prometheus#17416 by
renaming all CT* names to ST* in the whole codebase except RW2 (this is
done in separate
[PR](prometheus/prometheus#17411)) and
PrometheusProto exposition proto.

```
CreatedTimestamp -> StartTimestamp
CreatedTimeStamp -> StartTimestamp
created_timestamp -> start_timestamp
CT -> ST
ct -> st

```

Signed-off-by: bwplotka <[email protected]>
Scraping: detect staleness via unique reference
tsdb: couple of postings optimizations
…nd readability. (On-Disk Layout Paragraph)

Signed-off-by: Raul Leite <[email protected]>
extra space removed

Signed-off-by: Raul Leite <[email protected]>
Corrected the structure of the explanation regarding how samples are organized in the chunks directory and the handling of deletion records.

Signed-off-by: Raul Leite <[email protected]>
[Doc] Storage.md - Paragraph Rewrite
zenador and others added 4 commits November 15, 2025 21:07
…ion and EnableDelayedNameRemoval (#17161)

Signed-off-by: Jeanette Tan <[email protected]>
Signed-off-by: zenador <[email protected]>
Co-authored-by: Björn Rabenstein <[email protected]>
* fix: aws discovery test fix

Fixes a problem introduced after the merge of this prometheus/prometheus#17138

PR didn't take into account another merged PR!

```
discovery/aws/aws.go:218:54: too many arguments in call to NewEC2Discovery
    have (*EC2SDConfig, *slog.Logger, *ec2Metrics)
    want (*EC2SDConfig, discovery.DiscovererOptions)
discovery/aws/aws.go:222:66: too many arguments in call to NewLightsailDiscovery
    have (*LightsailSDConfig, *slog.Logger, *lightsailMetrics)
    want (*LightsailSDConfig, discovery.DiscovererOptions)
```

Signed-off-by: Will Bollock <[email protected]>

* fix: align ecs style

ECS was a new service discovery tool added after this PR was merged: prometheus/prometheus#17138

Aligns the style of passing a single "opts" to it like almost all the other
service discovery engines now use

Signed-off-by: Will Bollock <[email protected]>

---------

Signed-off-by: Will Bollock <[email protected]>
@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.
5 out of 13 committers have signed the CLA.

✅ bboreham
✅ charleskorn
✅ wbollock
✅ juliusmh
✅ zenador
❌ pipiland2612
❌ linasm
❌ rauldsl
❌ machine424
❌ 0xkato
❌ juliusv
❌ bwplotka
❌ mimir-github-bot[bot]
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 November 17, 2025 02:36
d.Discovery = refresh.NewDiscovery(
refresh.Options{
Logger: logger,
Logger: opts.Logger,
Copy link

Choose a reason for hiding this comment

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

Bug: ECS Discovery: Correct Labeling Inconsistency

The SetName field is missing from the refresh.Options struct in NewECSDiscovery. All other AWS discovery services (EC2 at line 200, Lightsail at line 164 in the diff) were updated to include SetName: opts.SetName in their refresh.NewDiscovery calls, but ECS was not. This inconsistency means ECS discovery metrics won't be properly labeled with the config name, breaking metric cardinality and making it impossible to distinguish between multiple ECS discovery configurations.

Fix in Cursor Fix in Web

@mimir-vendoring mimir-vendoring bot merged commit 316b091 into main Nov 17, 2025
31 of 32 checks passed
@mimir-vendoring mimir-vendoring bot deleted the bot/main/merge-upstream-main-202511170235 branch November 17, 2025 02:57
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.