prometheus/scrape
Arve Knudsen f0dfb9f802
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
fix(scrape): use HonorLabels instead of HonorTimestamps in newScrapeLoop (#17731)
* fix(scrape): use HonorLabels instead of HonorTimestamps in newScrapeLoop

The sampleMutator closure in newScrapeLoop was incorrectly passing
HonorTimestamps to mutateSampleLabels instead of HonorLabels. This
caused honor_labels configuration to be ignored, with the behavior
incorrectly controlled by honor_timestamps instead.

Adding TestNewScrapeLoopHonorLabelsWiring integration test that exercises
the real newScrapeLoop constructor with HonorLabels and HonorTimestamps
set to opposite values to catch this class of wiring bug.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update scrape/scrape_test.go

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add honor_labels=false test case

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2025-12-22 16:28:08 +01:00
..
testdata Include test CA text info (#14699) 2024-08-20 19:41:02 +02:00
clientprotobuf.go chore: enable gci linter (#16245) 2025-03-22 15:46:13 +00:00
helpers_test.go refactor(scrape)[PART2]: simplified scrapeLoop constructors & tests; add teststorage.Appendable mock (#17631) 2025-12-22 09:38:48 +00:00
manager.go refactor(scrape)[PART2]: simplified scrapeLoop constructors & tests; add teststorage.Appendable mock (#17631) 2025-12-22 09:38:48 +00:00
manager_test.go refactor(scrape)[PART2]: simplified scrapeLoop constructors & tests; add teststorage.Appendable mock (#17631) 2025-12-22 09:38:48 +00:00
metrics.go instrumentation: add native histograms to complement high-traffic summaries (#17374) 2025-11-27 18:45:35 +01:00
scrape.go fix(scrape): use HonorLabels instead of HonorTimestamps in newScrapeLoop (#17731) 2025-12-22 16:28:08 +01:00
scrape_test.go fix(scrape): use HonorLabels instead of HonorTimestamps in newScrapeLoop (#17731) 2025-12-22 16:28:08 +01:00
target.go refactor(scrape)[PART2]: simplified scrapeLoop constructors & tests; add teststorage.Appendable mock (#17631) 2025-12-22 09:38:48 +00:00
target_test.go refactor(scrape)[PART2]: simplified scrapeLoop constructors & tests; add teststorage.Appendable mock (#17631) 2025-12-22 09:38:48 +00:00