Commit graph

11867 commits

Author SHA1 Message Date
Matthieu MOREL c74b7ad4fb
Update tombstones.go
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-11 19:22:06 +01:00
Matthieu MOREL 118460a64f
tsdb/tombstones: use Go standard errors package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-11 19:19:50 +01:00
George Krajcsovits 39a35d92bc
tsdb/head: wlog exemplars after samples (#13113)
When samples are committed in the head, they are also written to the WAL.
The order of WAL records should be sample then exemplar, but this was
not the case for native histogram samples. This PR fixes that.

The problem with the wrong order is that remote write reads the WAL and
sends the recorded timeseries in the WAL order, which means exemplars
arrived before histogram samples. If the receiving side is Prometheus
TSDB and the series has not existed before then the exemplar does not
currently create the series. Which means the exemplar is rejected and lost.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-11-11 17:30:16 +01:00
Ziqi Zhao e250f09b5d
change origin schema in ReduceResolution method of histogram and float histogram (#13116)
* change origin schema in ReduceResolution method of histogram and float histogram

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

---------

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-10 14:33:34 +01:00
Jacob Baungård Hansen 80d2f992ae
codemirror-promql: Add request header to client (#13118)
With this commit we make it possible to adjust the request headers sent
to Prometheus by the codemirror-promql extension. This enables
customizing the headers sent, without re-implementing the Prometheus
client completely.

Signed-off-by: Jacob Baungard Hansen <jacobbaungard@redhat.com>
2023-11-10 11:22:32 +01:00
Julien Pivotto e8585e4d44
Merge pull request #13120 from roidelapluie/stalenesstracking
Follow-up to #13060: Add test to ensure staleness tracking
2023-11-09 10:48:16 -06:00
Julien Pivotto cfd83e71f7
Merge pull request #13110 from machine424/del-extra
head.go: Remove an unneeded snapshot trigger that was moved in https:…
2023-11-09 10:26:36 -06:00
Julien Pivotto 0fe34f6d78 Follow-up to #13060: Add test to ensure staleness tracking
This commit introduces an additional test in `scrape_test.go` to verify
staleness tracking when `trackTimestampStaleness` is enabled. The new
`TestScrapeLoopAppendStalenessIfTrackTimestampStaleness` function
asserts that the scrape loop correctly appends staleness markers when
necessary, reflecting the expected behavior with the feature flag turned
on.

The previous tests were only testing end of scrape staleness.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-11-09 10:20:35 -06:00
Julien Pivotto 8b2b7d3d7a
Merge pull request #13117 from machine424/remote-headers
remote_write: add a unit test to make sure the write client sends the extra http headers as expected
2023-11-09 09:52:23 -06:00
machine424 0996b78326
remote_write: add a unit test to make sure the write client sends
the extra http headers as expected

This will help letting prometheus off the hook from situations like
https://github.com/prometheus/prometheus/issues/13030

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2023-11-09 15:56:48 +01:00
machine424 a32fbc3658
head.go: Remove an unneeded snapshot trigger that was moved in https://github.com/prometheus/prometheus/pull/9328
and brougt back by mistake in 095f572d4a as part of https://github.com/prometheus/prometheus/pull/11447

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2023-11-09 11:46:46 +01:00
Ziqi Zhao ab2a7bb74f
add generic shrink function (#13001)
Add `ReduceResolution` method to `Histogram` and `FloatHistogram`

This takes the original `mergeToSchema` function and turns it into a more generic `reduceResolution` function, which is the building block for the new methods.

The methods will help with addressing #12864.

---------

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-08 14:43:05 +01:00
Arve Knudsen ae9221e152
tsdb/index.Symbols: Drop context argument from Lookup method (#13058)
Drop context argument from tsdb/index.Symbols.Lookup since lookup
should be fast and the context checking is a performance hit.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-08 13:08:33 +01:00
Julien Pivotto 252c7ca939
Merge pull request #13106 from mmorel-35/patch-1
web : use Go standard errors package
2023-11-08 02:01:25 -06:00
Matthieu MOREL 05fba53e57 web : use Go standard package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-08 06:37:59 +00:00
Julien Pivotto 6a124427fa
Merge pull request #13073 from prometheus/dependabot/github_actions/ossf/scorecard-action-2.3.1
build(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.1
2023-11-07 21:08:25 -06:00
Julien Pivotto bd3db70501
Merge pull request #13072 from prometheus/dependabot/github_actions/actions/checkout-4.1.1
build(deps): bump actions/checkout from 4.1.0 to 4.1.1
2023-11-07 21:08:07 -06:00
Julien Pivotto cf01ec2119
Merge pull request #13091 from mmorel-35/errorlint/util
util: use Go standard errors package
2023-11-07 21:07:25 -06:00
Goutham Veeramachaneni b80617a248
Merge pull request #12881 from dimitarvdimitrov/dimitar/TestQuerierIndexQueriesRace-less-synchronisation
Improve sensitivity of TestQuerierIndexQueriesRace
2023-11-07 12:16:43 +01:00
Björn Rabenstein 69c9c29061
Merge pull request #12977 from linasm/linasm/strict-validation-of-histogram-without-nans
ValidateHistogram: strict Count check in absence of NaNs
2023-11-05 23:13:29 +01:00
Julien Pivotto 7a07a279c9
Merge pull request #10721 from ncauchois/fix_prometheus_remote_write_dashboard
mixin: Use url filter on Remote Write dashboard
2023-11-03 15:49:42 -04:00
Linas Medziunas ebed7d0612 Change Validate to be a method on histogram structs
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-11-03 16:47:59 +02:00
Julien Pivotto b1293cf9da
Merge pull request #13080 from prometheus/dependabot/go_modules/github.com/klauspost/compress-1.17.2
build(deps): bump github.com/klauspost/compress from 1.17.1 to 1.17.2
2023-11-03 10:41:00 -04:00
Julien Pivotto 09e58ad881
Merge pull request #13081 from prometheus/dependabot/github_actions/scripts/actions/checkout-4.1.1
build(deps): bump actions/checkout from 4.1.0 to 4.1.1 in /scripts
2023-11-03 10:40:43 -04:00
Julien Pivotto ec8752eb66
Merge pull request #13071 from prometheus/dependabot/github_actions/github/codeql-action-2.22.5
build(deps): bump github/codeql-action from 2.21.9 to 2.22.5
2023-11-03 10:39:52 -04:00
Julien Pivotto 8686330502
Merge pull request #13076 from prometheus/dependabot/go_modules/k8s-io-1096e19dab
build(deps): bump the k8s-io group with 2 updates
2023-11-03 10:39:32 -04:00
Linas Medziunas 1f8aea11d6 Move histogram validation code to model/histogram
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-11-03 16:17:24 +02:00
Linas Medziunas 1cd6c1cde5 ValidateHistogram: strict Count check in absence of NaNs
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-11-03 16:17:24 +02:00
Matthieu MOREL fe057fc60d use Go standard errors package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-03 07:26:31 +00:00
Björn Rabenstein fae4561369
Merge pull request #12954 from linasm/linasm/optimize-floatBucketIterator2
Histogram performance: optimize floatBucketIterator
2023-11-02 23:59:32 +01:00
dependabot[bot] 9d9c598321
build(deps): bump github.com/klauspost/compress from 1.17.1 to 1.17.2
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.1 to 1.17.2.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.17.1...v1.17.2)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-02 20:09:48 +00:00
Bryan Boreham 0b02cc5277
Merge pull request #13078 from prometheus/dependabot/go_modules/github.com/linode/linodego-1.24.0
build(deps): bump github.com/linode/linodego from 1.23.0 to 1.24.0
2023-11-02 20:08:12 +00:00
Björn Rabenstein 79f4e45d64
Merge pull request #13089 from prometheus/beorn7/release
Merge release-2.48 back into main
2023-11-02 20:43:18 +01:00
beorn7 5dca994f64 Merge branch 'release-2.48' into beorn7/release 2023-11-02 19:58:33 +01:00
Bryan Boreham 6e2586b1c7
Merge pull request #13083 from LeviHarrison/release-2.48.0-rc.2
Release 2.48.0-rc.2
2023-11-02 18:21:02 +00:00
Julien Pivotto 8c560c9632
Merge pull request #13069 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/common-0.45.0
build(deps): bump github.com/prometheus/common from 0.44.0 to 0.45.0 in /documentation/examples/remote_storage
2023-11-02 14:10:06 -04:00
dependabot[bot] ea27db7389
build(deps): bump github.com/linode/linodego from 1.23.0 to 1.24.0
Bumps [github.com/linode/linodego](https://github.com/linode/linodego) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/linode/linodego/releases)
- [Commits](https://github.com/linode/linodego/compare/v1.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: github.com/linode/linodego
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-02 18:04:56 +00:00
Julien Pivotto 540a6729c0
Merge pull request #13077 from prometheus/dependabot/go_modules/go-opentelemetry-io-a16b2b5997
build(deps): bump the go-opentelemetry-io group with 2 updates
2023-11-02 14:03:52 -04:00
Julien Pivotto caec414964
Merge pull request #13085 from dimitarvdimitrov/dimitar/expose-findQueryMinMaxTime
Export `promql.FindMinMaxTime`
2023-11-02 14:02:17 -04:00
Bryan Boreham ae5dd1ffcb
Merge pull request #13062 from zenador/min-time-hist-chunks
Add min time to histogram chunks
2023-11-02 14:13:51 +00:00
Jeanette Tan 52eb303031 Refactor assigning MinTime in histogram chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 21:23:05 +08:00
Dimitar Dimitrov 9e3df532d8
Export promql.Engine.FindMinMaxTime
This function is useful to analyze promQL queries. We want to use this in Mimir to record the time range which the query touches.

I also chose to remove the `Engine` receiver because it was unnecessary, and it makes it easier to use, but happy to refactor that if you disagree.

The function is untested on its own. If you prefer to have unit tests now that its exported, I can look into adding some.

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
2023-11-02 13:17:35 +01:00
Jeanette Tan 3ccaaa40ba Fix according to code review
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:37:07 +08:00
György Krajcsovits 4296ecbd14 tsdb/compact_test.go: test mixed typed series with PopulateBlock
Add testcase and update test so that it can test native histograms as well.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-11-02 13:33:42 +08:00
Jeanette Tan 27abf09e7f Fix missing MinTime in histogram chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:39 +08:00
Jeanette Tan 2f7060bd5a Expand TestPopulateWithTombSeriesIterators to test earlier deletion intervals for histogram chunks as well as time-overlapping chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:35 +08:00
Jeanette Tan 7a4a1127b7 Expand TestPopulateWithTombSeriesIterators to test min max times of chunks, including mixed chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:33 +08:00
Jeanette Tan 04aabdd7cc Refactor TestPopulateWithDelSeriesIterator unit tests to reuse more code
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:30 +08:00
Jeanette Tan 46be85f2dc Make TestPopulateWithDelSeriesIterator tests cover histogram types and check MinTime
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:26 +08:00
Levi Harrison 8b87f3bbf1 Release 2.48.0-rc.2
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-11-01 21:19:24 -04:00