Commit graph

13153 commits

Author SHA1 Message Date
Ben Ye 5a218708f1
tsdb: Extend compactor interface to allow compactions to create multiple output blocks (#14143)
* add hook to allow head compaction to create multiple output blocks

Signed-off-by: Ben Ye <benye@amazon.com>

* change Compact interface; remove BlockPopulator changes

Signed-off-by: Ben Ye <benye@amazon.com>

* rebase main

Signed-off-by: Ben Ye <benye@amazon.com>

* fix lint

Signed-off-by: Ben Ye <benye@amazon.com>

* fix unit test

Signed-off-by: Ben Ye <benye@amazon.com>

* address feedbacks; add unit test

Signed-off-by: Ben Ye <benye@amazon.com>

* Apply suggestions from code review

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Update tsdb/compact_test.go

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2024-06-12 17:31:25 -04:00
Sebastian Rabenhorst 05380aa0ac
agent db: make rejecting ooo samples configurable (#14094)
feat: Make OOO ingestion time window configurable for Prometheus Agent.

Signed-off-by: Sebastian Rabenhorst <sebastian.rabenhorst@shopify.com>
2024-06-12 11:07:42 -03:00
Oleg Zaytsev 64a9abb8be
Change LabelValuesFor() to accept index.Postings (#14280)
The only call we have to LabelValuesFor() has an index.Postings, and we
expand it to pass to this method, which will iterate over the values.

That's a waste of resources: we can iterate on the index.Postings
directly.

If there's any downstream implementation that has a slice of series,
they can always do an index.ListPostings from them: doing that is
cheaper than expanding an abstract index.Postings.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-06-11 15:36:46 +02:00
George Krajcsovits 604287400c
Merge pull request #14284 from prometheus/prepare-2.53.rc.1
Prepare 2.53.rc.1
2024-06-11 14:01:40 +02:00
György Krajcsovits dd8676218b Prepare 2.53.0-rc.1 release
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-06-11 12:56:32 +02:00
György Krajcsovits 4cfec57606 Revert "Update changelog due to pr 14273"
This reverts commit dd44001465.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-06-11 12:55:02 +02:00
Ben Kochie 4c4c2be6dd
Merge pull request #14288 from prometheus/superq/pick_14285
Tune default GOGC
2024-06-11 11:58:10 +02:00
SuperQ 38bf349ff7
Update changelog for GOGC tuning
Include #14285 in changelog.

Signed-off-by: SuperQ <superq@gmail.com>
2024-06-11 11:37:32 +02:00
SuperQ 6ccee2c4a5
Tune default GOGC
Adjust the default GOGC value to 75. This is less of a memory savings,
but has less impact on CPU use.

Signed-off-by: SuperQ <superq@gmail.com>
2024-06-11 11:17:33 +02:00
György Krajcsovits 0793a26d96 native histograms: only reduce resolution for exponential histograms
Currently we can only reduce the resolution of exponential native
histograms, so checking the schema for that is slightly more precise
than checking against max schema.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-06-11 11:17:14 +02:00
Ben Kochie 7f0caf7229
Merge pull request #14285 from prometheus/superq/tune_gogc
Tune default GOGC
2024-06-11 11:14:50 +02:00
George Krajcsovits 23cca90cac
Merge pull request #14277 from zenador/nhcb-review
[nhcb branch] address review comments and merge with main
2024-06-11 10:55:02 +02:00
Julien b31aaa6f8a
Merge pull request #14282 from parnavh/fix-broken-link
fix: broken link on github mobile
2024-06-11 10:12:42 +02:00
SuperQ ea2b39a31e
Tune default GOGC
Adjust the default GOGC value to 75. This is less of a memory savings,
but has less impact on CPU use.

Signed-off-by: SuperQ <superq@gmail.com>
2024-06-11 03:44:06 +02:00
Ranveer Avhad 39902ba694
[BUGFIX] FastRegexpMatcher: do Unicode normalization as part of case-insensitive comparison (#14170)
* Converted string to standarized form
* Added golang.org/x/text in Go dependencies
* Added test cases for FastRegexMatcher
* Added benchmark for toNormalizedLower

Signed-off-by: RA <ranveeravhad777@gmail.com>
2024-06-10 18:31:41 -04:00
Bryan Boreham 64c5cc5134
Merge pull request #14209 from bboreham/api-error-url
[ENHANCEMENT] HTTP API: Add url to errors logged while sending response
2024-06-11 01:09:11 +03:00
Bryan Boreham c5d923aa7c
Merge pull request #14279 from colega/fix-label-names-for-not-found
headIndexReader.LabelNamesFor: skip not found series
2024-06-11 01:06:19 +03:00
Sergey 5a5a6f08ef
chore: use HumanizeDuration from prometheus/common (#14202)
* chore: use HumanizeDuration from prometheus/common

Signed-off-by: Sergey <freak12techno@gmail.com>

* chore: fixed linting

Signed-off-by: Sergey <freak12techno@gmail.com>

* chore: review fixes

---------

Signed-off-by: Sergey <freak12techno@gmail.com>
2024-06-10 20:40:11 +02:00
Rens Groothuijsen 19fd5212c3
docs: clarify default Docker command line parameters (#14194)
* docs: clarify default Docker command line parameters

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

* docs: move Docker command line parameters section and refer to Dockerfile

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

* Add link to Dockerfile in documentation

Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

---------

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
2024-06-10 20:16:02 +02:00
Oleg Zaytsev 10a3c7220b
MemPostings.PostingsForLabelMatching(): don't hold the mutex while matching (#14286)
* MemPostings.PostingsForLabelMatching: let mutex go

This changes the `MemPostings.PostingsForLabelMatching` implementation
to stop holding the read mutex while matching the label values.

We've seen that this method can be slow when the matcher is expensive,
that's why we even added a context expiration check.

However, there are critical process that might be waiting on this mutex:
writes (adding new series) and compaction (deleting the
garbage-collected ones), so we should avoid holding it for a long period
of time.

Given that we've copied the values to a slice anyway, there's no need to
hold the lock while matching.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-06-10 14:24:17 +02:00
Oleg Zaytsev 2dc177d8af
MemPostings.Delete(): reduce locking/unlocking (#13286)
* MemPostings: reduce locking/unlocking

MemPostings.Delete is called from Head.gc(), i.e. it gets the IDs of the
series that have churned.

I'd assume that many label values aren't affected by that churn at all,
so it doesn't make sense to touch the lock while checking them.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-06-10 14:23:22 +02:00
Björn Rabenstein 08621bebe9
Merge pull request #14269 from prometheus/beorn7/histogram-test
promql: Add tests for histogram counter reset only in bucket
2024-06-08 16:59:47 +02:00
parnavh c92a5773b2 fix: broken link on github mobile
Signed-off-by: parnavh <parnav100sach@gmail.com>
2024-06-08 20:23:46 +05:30
Oleg Zaytsev d0d361da53
headIndexReader.LabelNamesFor: skip not found series
It's quite common during the compaction cycle to hold series IDs for
series that aren't in the TSDB head anymore.

We shouldn't fail if that happens, as the caller has no way to figure
out which one of the IDs doesn't exist.

Fixes https://github.com/prometheus/prometheus/issues/14278

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-06-07 16:09:53 +02:00
Jeanette Tan b8cb12b989 rename hist to histogram according to code review
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 20:26:41 +08:00
Jeanette Tan 4c2aa872d4 update readme for testing framework
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 20:21:05 +08:00
Jeanette Tan 5e4e93c316 fix lint
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 19:24:05 +08:00
Jeanette Tan 14f8dded39 Merge branch 'main' into nhcb
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 19:17:14 +08:00
Jeanette Tan b0e320425c refine test rewriting regex and add validation
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 18:50:59 +08:00
Jeanette Tan 9adc1699c3 fix according to code review
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 18:50:59 +08:00
George Krajcsovits dea904150b
Merge pull request #14276 from prometheus/pick-pr14273-to-2.53
Fix Group.Equals() to take in account the new queryOffset too (#14273)
2024-06-07 10:40:31 +02:00
György Krajcsovits dd44001465 Update changelog due to pr 14273
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-06-07 10:21:27 +02:00
Marco Pracucci 1d2f2cb43d Fix Group.Equals() to take in account the new queryOffset too (#14273)
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-06-07 10:20:00 +02:00
George Krajcsovits 80d39c8189
Merge pull request #14255 from prometheus/prepare-v2.53-rc.0
Version bump to v2.53.0-rc.0
2024-06-07 08:35:10 +02:00
Marco Pracucci edd558884b
Fix Group.Equals() to take in account the new queryOffset too (#14273)
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-06-06 18:47:36 +01:00
Ben Kochie 51e303d450
Merge pull request #14244 from prometheus/dependabot/npm_and_yarn/web/ui/http-proxy-middleware-3.0.0
build(deps): bump http-proxy-middleware from 2.0.6 to 3.0.0 in /web/ui
2024-06-06 19:15:58 +02:00
Ben Kochie be0d51278c
Merge pull request #14270 from prometheus/dependabot/npm_and_yarn/web/ui/types/sinon-17.0.3
build(deps-dev): bump @types/sinon from 10.0.20 to 17.0.3 in /web/ui
2024-06-06 19:12:15 +02:00
Ben Kochie 3ca40003e3
Merge pull request #14272 from prometheus/dependabot/npm_and_yarn/web/ui/eslint-config-prettier-9.1.0
build(deps-dev): bump eslint-config-prettier from 8.10.0 to 9.1.0 in /web/ui
2024-06-06 19:11:38 +02:00
Ben Kochie 77f782026c
Merge pull request #14271 from prometheus/dependabot/npm_and_yarn/web/ui/codemirror/commands-6.6.0
build(deps): bump @codemirror/commands from 6.3.2 to 6.6.0 in /web/ui
2024-06-06 19:11:07 +02:00
Bryan Boreham 6fb738af51
Merge pull request #14173 from pracucci/fastregexmatcher-optimize-contains
Improve contains check done by FastRegexMatcher
2024-06-06 19:59:23 +03:00
dependabot[bot] 3db2d8ef2e
build(deps-dev): bump eslint-config-prettier in /web/ui
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.10.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.10.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-06 16:38:43 +00:00
dependabot[bot] f58f539c53
build(deps): bump @codemirror/commands from 6.3.2 to 6.6.0 in /web/ui
Bumps [@codemirror/commands](https://github.com/codemirror/commands) from 6.3.2 to 6.6.0.
- [Changelog](https://github.com/codemirror/commands/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/commands/compare/6.3.2...6.6.0)

---
updated-dependencies:
- dependency-name: "@codemirror/commands"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-06 16:37:28 +00:00
dependabot[bot] 9bfc47f1f7
build(deps-dev): bump @types/sinon from 10.0.20 to 17.0.3 in /web/ui
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.20 to 17.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-06 16:37:10 +00:00
Ben Kochie 687b9c2d62
Merge pull request #14262 from prometheus/dependabot/npm_and_yarn/web/ui/types/node-20.14.2
build(deps-dev): bump @types/node from 20.10.4 to 20.14.2 in /web/ui
2024-06-06 17:59:45 +02:00
Charles Korn 1f988f77ff
promql: extend test scripting language to support asserting on expected error message (#14038)
Add ability to assert that a query fails with a particular error message

This also adds documentation for the test scripting language in general,
including the new feature.

Signed-off-by: Charles Korn <charles.korn@grafana.com>

---------

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-06-06 17:56:25 +02:00
György Krajcsovits 3feefd903b Update changelog from review comments
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-06-06 17:54:04 +02:00
beorn7 c7fdfe8004 promql: Add tests for histogram counter reset only in bucket
This also exercises the "fast path" (only decoding count and sum),
i.e. where the counter reset isn't visible at all in the decoded data.

Signed-off-by: beorn7 <beorn@grafana.com>
2024-06-06 17:47:38 +02:00
Filip Petkovski 6e68046c25
Implement histogram statistics decoder (#14097)
Implement histogram statistics decoder

This commit speeds up histogram_count and histogram_sum
functions on native histograms. The idea is to have separate decoders which can be
used by the engine to only read count/sum values from histogram objects. This should help
with reducing allocations when decoding histograms, as well as with speeding up aggregations
like sum since they will be done on floats and not on histogram objects.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

---------

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2024-06-06 17:17:13 +02:00
dependabot[bot] 0661b9076f
build(deps): bump http-proxy-middleware from 2.0.6 to 3.0.0 in /web/ui
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 3.0.0.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.6...v3.0.0)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-06 13:58:59 +00:00
Ben Kochie ee0527e0c6
Merge pull request #14260 from prometheus/dependabot/npm_and_yarn/web/ui/types/jquery-3.5.30
build(deps-dev): bump @types/jquery from 3.5.29 to 3.5.30 in /web/ui
2024-06-06 15:57:29 +02:00