Commit graph

13239 commits

Author SHA1 Message Date
Oleg Zaytsev ed172a6667
Optimize label values with matchers by taking shortcuts (#13426)
Don't calculate postings beforehand: we may not need them. If all
matchers are for the requested label, we can just filter its values.

Also, if there are no values at all, no need to run any kind of
logic.

Also add more labelValuesWithMatchers benchmarks

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-01-23 11:40:21 +01:00
Bryan Boreham c095ba24f2
Merge pull request #13437 from yeya24/check-ctx-eval-series
Add more context cancellation check at evaluation time
2024-01-22 17:33:21 +00:00
Bryan Boreham 0fe7ba97c3
Merge pull request #13427 from bboreham/skip-empty-merge
storage: skip merging when no remote storage configured
2024-01-22 14:20:13 +00:00
Ben Ye d778591fd3 add more context cancellation check at evaluation time
Signed-off-by: Ben Ye <benye@amazon.com>
2024-01-21 14:19:39 -08:00
Chris Marchbanks 65cf528403
Remove csmarchbanks from remote write owners (#13432)
I have not had the time to keep up with remote write and have no plans
to work on it in the near future so I am withdrawing my maintainership
of that part of the codebase. I continue to focus on client_python.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2024-01-19 15:37:12 -07:00
Bryan Boreham 63cdd6dbe1 storage: skip merging when no remote storage configured
Prometheus is hard-coded to use a fanout storage between TSDB and
a remote storage which by default is empty.
This change detects the empty storage and skips merging between
result sets, which would make `Select()` sort results.

Bottom line: we skip a sort unless there really is some remote storage
configured.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-01-18 17:50:06 +00:00
Rewanth Tammana 102fd8cc88
Enhanced visibility for promtool test rules with JSON colored formatting (#13342)
* Added diff flag for unit test to improvise readability & debugging

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Removed blank spaces

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Fixed linting error

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Added cli flags to documentation

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Revert unrrelated linting fixes

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Fixed review suggestions

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Cleanup

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Updated flag description

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

* Updated flag description

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>

---------

Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>
2024-01-18 09:49:16 -05:00
Bryan Boreham 4ad9b6df2e
Merge pull request #13336 from machine424/flakky
scrape_test.go: Increase scrape interval in TestScrapeLoopCache
to reduce potential flakiness.
2024-01-18 14:12:55 +00:00
Bryan Boreham b9952ff571
Merge pull request #13380 from machine424/fixes
fix(discovery tests): allow requireUpdate util to timeout in discovery/file…
2024-01-18 14:11:01 +00:00
Björn Rabenstein bfbb13cf36
Merge pull request #13267 from linasm/simplify-native-histogram-math
promql: simplify Native Histogram arithmetics
2024-01-18 13:50:59 +01:00
Goutham Veeramachaneni 0524b880e7
Merge pull request #13169 from gouthamve/fix-vendoring-script
otlp: Minor cosmetic fixes to the update script
2024-01-18 17:21:21 +05:30
Julien Pivotto d3906655bb
Merge pull request #13356 from prometheus/dependabot/github_actions/actions/setup-node-4.0.1
build(deps): bump actions/setup-node from 3.8.1 to 4.0.1
2024-01-18 12:11:32 +01:00
Julien Pivotto ee3edc4a70
Merge pull request #13408 from machine424/save-cycles
chore(kubernetes): check preconditions earlier and avoid unnecessary checks or iterations
2024-01-18 12:07:07 +01:00
Julien Pivotto 69dd8222b1
Merge pull request #13422 from prometheus/dependabot/go_modules/github.com/hetznercloud/hcloud-go/v2-2.6.0
build(deps): bump github.com/hetznercloud/hcloud-go/v2 from 2.4.0 to 2.6.0
2024-01-18 12:05:47 +01:00
dependabot[bot] 110ba0a2c7
build(deps): bump github.com/hetznercloud/hcloud-go/v2
Bumps [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) from 2.4.0 to 2.6.0.
- [Release notes](https://github.com/hetznercloud/hcloud-go/releases)
- [Changelog](https://github.com/hetznercloud/hcloud-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hetznercloud/hcloud-go/compare/v2.4.0...v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/hetznercloud/hcloud-go/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 10:58:49 +00:00
Julien Pivotto f52605b584
Merge pull request #13415 from aknuds1/arve/test-label-values-with-matchers-one-more
TestLabelValuesWithMatchers: Add test case
2024-01-18 11:57:12 +01:00
Julien Pivotto c860b52772
Merge pull request #13417 from iblancasa/upgrade-deps
Upgrade some golang dependencies for resty 2.11
2024-01-18 11:56:50 +01:00
Goutham aee6896c47
Minor fixes to otlp vendor update script
Signed-off-by: Goutham <gouthamve@gmail.com>
2024-01-18 15:32:06 +05:30
Julien Pivotto d3dfe486fc
Merge pull request #13352 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/influxdata/influxdb-1.11.4
build(deps): bump github.com/influxdata/influxdb from 1.11.2 to 1.11.4 in /documentation/examples/remote_storage
2024-01-17 18:15:40 +01:00
Julien Pivotto 00c8dd53fe
Merge pull request #13353 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/prometheus-0.48.1
build(deps): bump github.com/prometheus/prometheus from 0.48.0 to 0.48.1 in /documentation/examples/remote_storage
2024-01-17 18:15:28 +01:00
Julien Pivotto fb74a3e2d7
Merge pull request #13363 from jan--f/embed.go-sorted-file-list
scripts: sort file list in embed directive
2024-01-17 18:14:13 +01:00
Julien Pivotto 4f941bbf69
Merge pull request #13416 from tylitianrui/feat/remove_obsolete_build_tag
remove  obsolete build tag
2024-01-17 18:12:21 +01:00
zenador a3ddfbd1ee
Add warnings for histogramRate applied with isCounter not matching counter/gauge histogram (#13392)
Add warnings for histogramRate applied with isCounter not matching counter/gauge histogram

---------

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-01-17 17:06:35 +01:00
Ziqi Zhao df2a0ecf3b
Native Histograms: support native_histogram_min_bucket_factor in scrape_config (#13222)
Native Histograms: support native_histogram_min_bucket_factor in scrape_config

---------

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
2024-01-17 16:58:54 +01:00
Israel Blancas c0a66e5540
Upgrade some golang dependencies for resty 2.11
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
2024-01-17 16:43:19 +01:00
tyltr f97fa2736c remove obsolete build tag
Signed-off-by: tyltr <tylitianrui@126.com>
2024-01-17 22:26:32 +08:00
Arve Knudsen 8598150f48 TestLabelValuesWithMatchers: Add test case
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-01-17 12:51:56 +01:00
Ivan Babrou a6b35ff304
promql: use natural sort in sort_by_label and sort_by_label_desc (#13411)
These functions are intended for humans, as robots can already sort the results
however they please. Humans like things sorted "naturally":

* https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/

A similar thing has been done to Grafana, which is also used by humans:

* https://github.com/grafana/grafana/pull/78024
* https://github.com/grafana/grafana/pull/78494

Signed-off-by: Ivan Babrou <github@ivan.computer>
2024-01-16 21:34:09 -03:00
Bryan Boreham 7153f61790
Merge pull request #13407 from pracucci/fix-13242-regressions
Fix regressions introduced by #13242
2024-01-16 13:19:31 +00:00
Matthias Loibl 99b12b5edc
Merge pull request #13180 from the-it/esommer/cluster_swtich_dashboard
add cluster variable to Overview dashboard
2024-01-16 12:04:14 +00:00
Ted Robertson cf9e934036
Examples: link to rate for new users (#10535)
* Examples: link to `rate` for new users

Signed-off-by: Ted Robertson 10043369+tredondo@users.noreply.github.com
Co-authored-by: Bryan Boreham <bjboreham@gmail.com>
2024-01-16 11:13:52 +00:00
machine424 2d01e56695
chore(kubernetes): check preconditions earlier and avoid unnecessary checks or iterations
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-01-16 12:10:35 +01:00
Ted Robertson 73bbeaafbf
Docs: Query Basics: link to rate (#10538)
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
2024-01-16 11:09:51 +00:00
tyltr 1fa131ee03
fix slice copy in 1.20 (#13389)
The slices package is added to the standard library in Go 1.21;
we need to import from the exp area to maintain compatibility with Go 1.20.

Signed-off-by: tyltr <tylitianrui@126.com>
2024-01-16 11:06:58 +00:00
Marco Pracucci 7852a7c516
Fix regressions introduced by #13242
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-01-16 12:00:53 +01:00
zenador 72a8f1084b
Restore more efficient version of NewPossibleNonCounterInfo annotation (#13022)
Restore more efficient version of NewPossibleNonCounterInfo annotation

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>

---------

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-01-16 09:54:16 +01:00
Bartlomiej Plotka 43e14844a3
Merge pull request #13404 from prometheus/added-missing-web
Cut 2.49.1 web package.
2024-01-15 17:56:27 +01:00
bwplotka 216b5edb41 Cut 2.49.1 web package.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 16:44:33 +00:00
Bartlomiej Plotka 9947cb2c17
Merge pull request #13402 from prometheus/cut-2.49.1
Cut 2.49.1 with scrape q= bugfix.
2024-01-15 17:42:57 +01:00
bwplotka 65a101cdc2 Cut 2.49.1 with scrape q= bugfix.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 16:18:18 +00:00
Kumar Kalpadiptya Roy e61e5938d6 Issue #13268: fix quality value in accept header
Signed-off-by: Kumar Kalpadiptya Roy <kalpadiptya.roy@outlook.com>
2024-01-15 16:16:05 +00:00
Giedrius Statkevičius b695e069b8
tsdb/main: wire "EnableOverlappingCompaction" to tsdb.Options (#13398)
This added the https://github.com/prometheus/prometheus/pull/13393
"EnableOverlappingCompaction" parameter to the compactor code but not to
the tsdb.Options. I forgot about that. Add it to `tsdb.Options` too and
set it to `true` in Prometheus.

Copy/paste the description from
https://github.com/prometheus/prometheus/pull/13393#issuecomment-1891787986

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2024-01-15 16:42:40 +01:00
Bartlomiej Plotka 90000a2ef2
Merge pull request #13399 from prometheus/merge-2.49.0-back
Merge 2.49.0 release to main
2024-01-15 16:09:24 +01:00
bwplotka 09d351668f Fixed changelog
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 11:42:09 +00:00
Bartlomiej Plotka db3544c552
Merge branch 'main' into merge-2.49.0-back
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-01-15 12:38:36 +01:00
Bartlomiej Plotka 683a46cc99
Merge pull request #13397 from prometheus/cut-2.49.0
Cut 2.49.0
2024-01-15 11:48:43 +01:00
Ayoub Mrini ace9c8a3da
promtool: allow setting multiple matchers to "promtool tsdb dump" command. (#13296)
Conditions are ANDed inside the same matcher but matchers are ORed

Including unit tests for "promtool tsdb dump".

Refactor some matchers scraping utils.

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-01-15 10:29:53 +00:00
bwplotka cf50f85faa Cut 2.49.0
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 09:55:35 +00:00
Ben Kochie 17920623e7
Merge pull request #13391 from GiedriusS/compact_merge_func
tsdb/compact: fix passing merge func
2024-01-15 09:43:06 +01:00
gotjosh 4fbd406a36
Merge pull request #13393 from vinted/disable_overlapping_compaction 2024-01-15 08:37:24 +00:00