Commit Graph

14597 Commits (9ad93ba8df6de2a9ad752e2e53a1bdbf99f34db4)

Author SHA1 Message Date
Björn Rabenstein 384c5951ef
Merge pull request #14489 from harry671003/implement_metadata_limit
storage: Implement limit in mergeGenericQuerier
2024-11-19 17:32:16 +01:00
Arve Knudsen 06d54fcc6c
[PERF] TSDB: Optimize inverse matching (#14144)
Simple follow-up to #13620. Modify `tsdb.PostingsForMatchers` to use the optimized tsdb.IndexReader.PostingsForLabelMatching method also for inverse matching.

Introduce method `PostingsForAllLabelValues`, to avoid changing the existing method.

The performance is much improved for a subset of the cases; there are up to
~60% CPU gains and ~12.5% reduction in memory usage. 

Remove `TestReader_InversePostingsForMatcherHonorsContextCancel` since
`inversePostingsForMatcher` only passes `ctx` to `IndexReader` implementations now.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-11-19 15:49:01 +00:00
Charles Korn 62e6e55c07
promql: fix issues with comparison binary operations with `bool` modifier and native histograms (#15413)
* Fix issue where comparison operations with `bool` modifier and native histograms return histograms rather than 0 or 1

* Don't emit anything for comparisons between floats and histograms when `bool` modifier is used

* Don't emit anything for comparisons between floats and histograms when `bool` modifier is used between a vector and a scalar

---------

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-11-19 09:13:34 +01:00
Charles Korn 45db23617a
promql: fix incorrect "native histogram ignored in aggregation" annotations (#15414)
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-11-19 08:17:49 +01:00
huochexizhan 4f48e76086 chore: fix some function names in comment
Signed-off-by: huochexizhan <huochexizhan@outlook.com>
2024-11-19 12:02:10 +08:00
Bryan Boreham 379304f60a Merge branch 'release-2.53' into merge-release-into-main 2024-11-18 14:48:45 +00:00
Bryan Boreham 210ef03479 Merge branch 'release-2.55' into merge-release-into-main 2024-11-18 14:44:56 +00:00
Bryan Boreham 26886d6d95 Merge branch 'release-3.0' into merge-release-into-main 2024-11-18 14:43:56 +00:00
TJ Hoplock 16a4354b48 chore(deduper): add compile check that slog.Handler int is satisfied
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2024-11-15 15:48:34 -05:00
Đurica Yuri Nikolić 101b1c307f
[ENHANCEMEN] Remote-Write: optionally use a DNS resolver that picks a random IP (#15329)
When a remote-write is executed towards a host name that is resolved to multiple IP addresses, this PR introduces a possibility to force creation of new connections used for the remote-write request to a randomly chosen IP address from the ones corresponding to the host name. The default behavior remains unchanged, i.s., the IP address used for the connection creation remains the one chosen by Go.

This is an experimental feature, it is disabled by default.

Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
2024-11-15 15:41:49 +00:00
zenador e13c28bd4a
Use a function to determine if an aggregation function is experimental (#15331)
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-11-15 15:09:50 +01:00
Bryan Boreham 0ef0b75a4f [TESTS] Remote-Write: Fix BenchmarkStartup
It was crashing due to uninitialized metrics, and not terminating due to
incorrectly reading segment names.

We need to export `SetMetrics` to avoid the first problem.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-11-15 11:22:07 +00:00
Bryan Boreham c5d009d57f
Merge pull request #15393 from jan--f/prep-release-3.0.0
Prep release 3.0.0
2024-11-14 16:19:49 +00:00
Jan Fajerski d541b3bbeb prepare release 3.0.0
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-11-13 15:41:05 +01:00
Jan Fajerski 84396bf636 migration: add removal of AM v1 api
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-11-13 15:40:58 +01:00
Tristan Colgate-McFarlane 48abdcd83f
bugfix: allow quoted exemplar keys in openmetrics text format
Signed-off-by: Tristan Colgate-McFarlane <tristan@cerbos.dev>
2024-11-12 15:29:44 +00:00
Neeraj Gartia 789c9b1a5e
[BUGFIX] PromQL: Corrects the behaviour of some operator and aggregators with Native Histograms (#15245)
PromQL: Correct the behaviour of some operator and aggregators with Native Histograms

---------

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2024-11-12 15:37:05 +01:00
Fiona Liao c599d37668
Always return unknown hint for first sample in non-gauge histogram chunk (#15343)
Always return unknown hint for first sample in non-gauge histogram chunk

---------

Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-11-12 15:14:06 +01:00
Bryan Boreham 57a7a2939a
Merge pull request #15389 from jan--f/fix-appender-race-3.0
[BUGFIX] TSDB: Fix race on stale values in headAppender (#15322)
2024-11-12 14:12:37 +00:00
Julien af2d67d28e
Merge pull request #15388 from roidelapluie/cpfixreload
[cherry pick] Fix auto reload when a config file with a syntax error is reverted
2024-11-12 14:59:56 +01:00
Björn Rabenstein b4c0a5b394
Merge pull request #15169 from jhesketh/jhesketh/clamp
Clamp functions should ignore native histograms
2024-11-12 14:56:12 +01:00
Bryan Boreham 003a2270e9 [BUGFIX] TSDB: Fix race on stale values in headAppender (#15322)
* [BUGFIX] TSDB: Fix race on stale values in headAppender

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Simplify

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

---------

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
(cherry picked from commit f42b37ff2f)
2024-11-12 14:55:12 +01:00
Ben Kochie 628bbd2682
Update linting (#15369)
* Ignore all node_modules dirs.
* Update Makefile.common golangci-lint to match CI pipeline.

Signed-off-by: SuperQ <superq@gmail.com>
2024-11-12 13:27:39 +01:00
Ben Kochie 869addfec8
Enable auto-gomaxprocs by default (#15378)
Enable the `auto-gomaxprocs` feature flag by default.
* Add command line flag `--no-auto-gomaxprocs` to disable.

Signed-off-by: SuperQ <superq@gmail.com>
2024-11-12 13:27:01 +01:00
Bryan Boreham 32e28a25bc
Merge pull request #15379 from fionaliao/fix-migration-guide
docs: additional formatting fixes to 3.0 migration guide
2024-11-12 11:51:09 +00:00
Bryan Boreham 49999b8a90
Merge pull request #15210 from bboreham/faster-lowercase
FastRegexMatcher: use stack memory for lowercase copy of string
2024-11-12 11:46:08 +00:00
Bryan Boreham f0bd5fdcc6
Merge pull request #15226 from aniketnk/i15185
Parallelize tests in cmd/promtool/
2024-11-12 11:40:30 +00:00
Julien c02a66a612
Merge pull request #15348 from prometheus/superq/sigv4
Update sigv4 library
2024-11-12 12:20:29 +01:00
Bryan Boreham 70750acd57
Merge pull request #15386 from roidelapluie/rel255
Fix release date
2024-11-12 11:03:15 +00:00
Julien b93aec077c Fix auto reload when a config file with a syntax error is reverted
When we had a syntax error but restored the old file, we did not
re-trigger the config reload, so the config reload metric was showing
that config reload was unsucessful.

I made magic to handle logs in cmd/prometheus.

For now it is a separate file so we can backport this easily.

I will generalize the helper in another PR.

Signed-off-by: Julien <roidelapluie@o11y.eu>
2024-11-12 11:56:05 +01:00
Julien e9179cb240
Merge pull request #15011 from roidelapluie/fixreload
Fix auto reload when a config file with a syntax error is reverted
2024-11-12 11:55:21 +01:00
Fiona Liao 928e691bc6
Merge branch 'release-3.0' into fix-migration-guide
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
2024-11-12 09:43:42 +00:00
Julien ebc45750ef Fix release date
Closes #15385

Signed-off-by: Julien <roidelapluie@o11y.eu>
2024-11-12 10:34:58 +01:00
Bartlomiej Plotka 14f7a8e6ba
Merge pull request #15375 from jan--f/prep-release-3.0.0-rc.1
Prep release 3.0.0 rc.1
2024-11-11 16:35:49 -07:00
Joshua Hesketh ed2668bbda
Merge branch 'main' into jhesketh/clamp
Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
2024-11-12 10:20:58 +11:00
bwplotka 22eec4a390 Updated CHANGELOG.md
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-11-11 22:34:49 +00:00
Bartlomiej Plotka 7311ce3c00 Update CHANGELOG.md
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-11-11 22:32:26 +00:00
Jan Fajerski 60489308a1 Prepare v3.0.0-rc.1
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-11-11 22:32:26 +00:00
Jan Fajerski 3067d0bc2f update CHANGELOG and migration guide
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-11-11 22:32:26 +00:00
Bartlomiej Plotka f4a26f8d83
Merge pull request #15384 from prometheus/otlp-utf8-from-main
3.0 Port: Allow UTF-8 characters in metric and label names as opt-in feature (plus config entry)
2024-11-11 15:19:21 -07:00
bwplotka e08794c53f Added config entry.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-11-11 21:44:08 +00:00
Arthur Silva Sens 55e34c8c5f Allow UTF-8 characters in metric and label names as opt-in feature (#15258)
* Allow UTF-8 characters in metric and label names as opt-in feature

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2024-11-11 21:27:55 +00:00
Bartlomiej Plotka 9df69049a1
Merge pull request #15382 from prometheus/bwplotka-patch-1
Update migration.md for TSDB storage upgrade
2024-11-11 14:09:29 -07:00
Bartlomiej Plotka 99cbdc113c
Update migration.md for TSDB storage upgrade
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-11-11 19:32:48 +00:00
Bryan Boreham 5450e6d368 [BUGFIX] TSDB: Apply fixes from loadWAL to loadWBL
Move a couple of variables inside the scope of a goroutine, to avoid
data races.

Use `zeropool` to reduce garbage and avoid some lint warnings.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-11-11 18:41:33 +00:00
Fiona Liao 67764d7cfd Better spacing for flags
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
2024-11-11 18:31:50 +00:00
Fiona Liao b2fd5b7e45 Format PromQL section, replace table
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
2024-11-11 18:31:43 +00:00
Fiona Liao 962a3cd6be Add backticks to fallback_scrape_protocol
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
2024-11-11 18:31:34 +00:00
Fiona Liao ad8138a65d Add newlines before code blocks
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
2024-11-11 18:31:28 +00:00
Ben Kochie 0f0deb77a2
Enable auto-gomemlimit by default (#15372)
Enable the `auto-gomemlimit` feature flag by default.
* Add command line flag `--no-auto-gomemlimit` to disable.

Signed-off-by: SuperQ <superq@gmail.com>
2024-11-11 18:26:38 +01:00