Commit graph

11708 commits

Author SHA1 Message Date
Julien Pivotto 8a0c9aec1c
Merge pull request #12985 from LeviHarrison/merge-main-release-2.48
Cherry pick latest main changes into 2.48
2023-10-15 22:28:34 +02:00
Levi Harrison 454a0a2c1b Update dependencies for 2.48 (#12964)
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Julius Volz 191c24a0ed Fix: Exempt "_bucket" suffix from PossibleNonCounterInfo warning (#12982)
Related to PR #12152

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Julien Pivotto 77c1c2c44a Merge pull request #12981 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/prometheus-0.47.2
build(deps): bump github.com/prometheus/prometheus from 0.45.0 to 0.47.2 in /documentation/examples/remote_storage

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Ziqi Zhao 60e2bb0135 enhance promtool tsdb analyze command (#12869)
Improve promtool tsdb analyze

- Make it more suitable for variable size float chunks.
- Add support for histogram chunks.

---------

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Levi Harrison 4284e6f2f7 Merge pull request #11860 from mmorel-35/azure-sdk-for-go
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Paschalis Tsilias 42b8f2f5fc tsdb/agent: allow ingestion of OOO samples (#12897)
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Ganesh Vernekar 4df2f2432b Additionally wrap WBL replay error (#12406)
* Additionally wrap WBL replay error

Although WBL replay is already wrapped with errLoadWbl,
there are other errors that can happen during a WBL replay.
We should not try to repair WAL in those cases.

This commit additionally wraps the final error in Head.Init again
with errLoadWbl so that WBL replay errors can be identified properly.

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Jesus Vazquez <jesusvzpg@gmail.com>
Co-authored-by: Jesus Vazquez <jesusvzpg@gmail.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Levi Harrison 4307fa19ee Merge pull request #12819 from prometheus/dependabot/go_modules/golang.org/x/net-0.15.0
build(deps): bump golang.org/x/net from 0.13.0 to 0.15.0

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Levi Harrison 7f7cb471b8 Merge pull request #12848 from prometheus/dependabot/go_modules/k8s-io-815bab050d
build(deps): bump the k8s-io group with 2 updates

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Levi Harrison 281dc29677 Merge pull request #12912 from prometheus/dependabot/go_modules/github.com/aws/aws-sdk-go-1.45.19
build(deps): bump github.com/aws/aws-sdk-go from 1.44.317 to 1.45.19

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Arthur Silva Sens 644cb3be70 Add created timestamps to prompb (#12936)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Levi Harrison ea3ad744a9
Merge pull request #12956 from LeviHarrison/shepherd-2.48 2023-10-09 13:01:57 -04:00
Bryan Boreham f6d9c84fde
scraping: delay creating buffer, to save memory (#12953)
We don't need the buffer to read the response until the scrape http call
returns; creating it earlier makes the buffer pool larger.

I split `scrape()` into `scrape()` which returns with the http response,
and `readResponse()` which decompresses and copies the data into the
supplied buffer. This design was chosen to minimize impact on the logic.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-10-09 17:23:53 +01:00
Levi Harrison e7a1d3bfaf Volunteer Levi Harrison for release shepherd
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-09 12:21:57 -04:00
Oleg Zaytsev fe90dcccff
Revert ListPostings change (#12955)
Reverts change from https://github.com/prometheus/prometheus/pull/12906

The benchmarks show that it's slower when intersecting, which is a
common usage for ListPostings (when intersecting matchers from Head)

(old is before #12906, new is #12906):

                           │     old     │                 new                 │
                           │   sec/op    │   sec/op     vs base                │
Intersect/LongPostings1-16   20.54µ ± 1%   21.11µ ± 1%   +2.76% (p=0.000 n=20)
Intersect/LongPostings2-16   51.03m ± 1%   52.40m ± 2%   +2.69% (p=0.000 n=20)
Intersect/ManyPostings-16    194.2m ± 3%   332.1m ± 1%  +71.00% (p=0.000 n=20)
geomean                      5.882m        7.161m       +21.74%

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-10-09 17:25:18 +02:00
Oleg Zaytsev 5bd8c8c561
Clarify Postings.At() contract (#12921)
It's implicit, but should be explicit. It is invalid to call At() after
a failed call to Next() or Seek().

Following up on https://github.com/prometheus/prometheus/pull/12906

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-10-09 16:15:06 +02:00
Björn Rabenstein b787e5f190
Merge pull request #12931 from zenador/warning-non-monotonic-classic-histogram
Add warning when monotonicity is forced in the input to histogram_quantile
2023-10-08 15:59:48 +02:00
Danny Kopping d3554d8421
Show group interval in Rules display (#12943)
* Show group interval in Rules display

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

* Humanise interval

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

---------

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2023-10-08 14:51:24 +02:00
Bryan Boreham a5a4eab679
Storage: reduce memory allocations when merging series sets (#12938)
Instead of setting to nil and allocating a new slice every time the
merge is advanced, re-use the previous slice.
This is safe because the `currentSets` member is only used inside member
functions, and explicitly copied in `At()`, the only place it leaves the
struct.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-10-06 12:28:07 +01:00
Bryan Boreham b8f8c3c277
Merge pull request #12939 from bboreham/hoist-scrape-labels
scraping: hoist labels variable to save garbage
2023-10-06 12:27:32 +01:00
Jeanette Tan 0cbf0c1c68 Revise according to code review
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-10-06 19:09:32 +08:00
Bryan Boreham 7c934ae18c scraping: hoist labels variable to save garbage
`lset` escapes to heap due to being passed through the text-parser
interface, so we can reduce garbage by hoisting it out of the loop so
only one allocation is done for every series in a scrape.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-10-05 11:04:59 +00:00
rakshith210 cdad64002a
Added Azure OAuth support (#12572)
* Added Azure OAuth support

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Added missing comment

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Addressing comment

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Fixed lint issue

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Fix test

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Addressing comments

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Added documentation and updated unit tests

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Addressing comments

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

---------

Signed-off-by: rakshith210 <rakshith.me@gmail.com>
2023-10-04 22:16:36 -04:00
Julien Pivotto 0331bcc7c9
Merge pull request #12932 from prometheus/release-2.47
Merge release 2.47 into main
2023-10-04 15:05:53 +02:00
Jeanette Tan feaa93da77 Add warning when monotonicity is forced in the input to histogram_quantile
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-10-04 18:53:55 +08:00
Bryan Boreham c4d1a8beff
Merge pull request #12930 from prometheus/superq/pick-12874
Release 2.47.1
2023-10-04 11:06:28 +01:00
Arve Knudsen b43358fd43
API: Add tests for query timeout parameter (#12927)
Add unit tests for Web API's query endpoint (GET/POST).
Also modify the endpoint handler to use context.WithDeadline instead of
context.WithTimeout, so the deadline is deterministic for the tests.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-04 10:36:55 +02:00
SuperQ 64130d7909
Release 2.47.1
* [BUGFIX] Fix duplicate sample detection at chunk size limit #12874

Signed-off-by: SuperQ <superq@gmail.com>
2023-10-04 09:46:57 +02:00
Björn Rabenstein ec9170b8bf
Merge pull request #12874 from krajorama/outof-order-chunks
Fix duplicate sample detection at chunk size limit
Signed-off-by: SuperQ <superq@gmail.com>
2023-10-04 09:44:34 +02:00
gotjosh 79be1b8357
Merge pull request #12909 from 09jvilla/patch-1
Clarify what happens when a rule group takes too long to execute
2023-10-03 10:43:57 +01:00
Jennifer Villa ea7bec4cc7
Update recording_rules.md
updated language to be a bit more clear

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-10-02 21:44:54 -04:00
Jennifer Villa 65ffa0c511
Update recording_rules.md
adding Josh's suggestion

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-10-02 21:37:29 -04:00
Oleg Zaytsev 1492031ef2
Optimize ListPostings Next() (#12906)
The Next() call of ListPostings() was updating two values, while we can
just update the position. This is up to 30% faster for high number of
Postings.

goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/tsdb/index
cpu: 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz
                              │     old     │                 new                 │
                              │   sec/op    │   sec/op     vs base                │
ListPostings/count=100-16       819.2n ± 0%   732.6n ± 0%  -10.58% (p=0.000 n=20)
ListPostings/count=1000-16      2.685µ ± 1%   2.017µ ± 0%  -24.88% (p=0.000 n=20)
ListPostings/count=10000-16     21.43µ ± 1%   14.81µ ± 0%  -30.91% (p=0.000 n=20)
ListPostings/count=100000-16    209.4µ ± 1%   143.3µ ± 0%  -31.55% (p=0.000 n=20)
ListPostings/count=1000000-16   2.086m ± 1%   1.436m ± 1%  -31.18% (p=0.000 n=20)
geomean                         29.02µ        21.41µ       -26.22%

We're talking about microseconds here, but they just keep adding.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-10-02 16:24:25 +02:00
Arve Knudsen de7e057d3c
tsdb: Tighten up sub-benchmark scope in BenchmarkQuerier (#12718)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-02 12:16:37 +02:00
Julien Pivotto eeead61e48
Merge pull request #12913 from prometheus/dependabot/go_modules/github.com/hashicorp/consul/api-1.25.1
build(deps): bump github.com/hashicorp/consul/api from 1.22.0 to 1.25.1
2023-10-02 05:26:35 +02:00
Julien Pivotto b157c0f821
Merge pull request #12914 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/client_golang-1.17.0
build(deps): bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 in /documentation/examples/remote_storage
2023-10-02 05:26:09 +02:00
Julien Pivotto 92accb188e
Merge pull request #12916 from prometheus/dependabot/github_actions/actions/upload-artifact-3.1.3
build(deps): bump actions/upload-artifact from 3.0.0 to 3.1.3
2023-10-02 05:25:35 +02:00
Julien Pivotto 3e1c268828
Merge pull request #12911 from prometheus/dependabot/github_actions/scripts/actions/checkout-4.1.0
build(deps): bump actions/checkout from 4.0.0 to 4.1.0 in /scripts
2023-10-02 05:25:12 +02:00
dependabot[bot] 4ba8430299
build(deps): bump actions/upload-artifact from 3.0.0 to 3.1.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.0.0 to 3.1.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...a8a3f3ad30e3422c9c7b888a15615d19a852ae32)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 23:57:36 +00:00
dependabot[bot] 754fcc265e
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.16.0...v1.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 23:53:21 +00:00
dependabot[bot] 5d8f0e0582
build(deps): bump github.com/hashicorp/consul/api from 1.22.0 to 1.25.1
Bumps [github.com/hashicorp/consul/api](https://github.com/hashicorp/consul) from 1.22.0 to 1.25.1.
- [Release notes](https://github.com/hashicorp/consul/releases)
- [Changelog](https://github.com/hashicorp/consul/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/consul/compare/api/v1.22.0...api/v1.25.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/consul/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 23:48:39 +00:00
dependabot[bot] 216cf6046e
build(deps): bump actions/checkout from 4.0.0 to 4.1.0 in /scripts
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](3df4ab11eb...8ade135a41)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 23:43:34 +00:00
Julien Pivotto 2fe9e7bfd7
Merge pull request #12907 from mmorel-35/errorlint/model
ci(lint): enable errorlint linter on model
2023-10-02 00:32:08 +02:00
Jennifer Villa 601e5b9028
Update recording_rules.md
specified the evaluation interval defines when the next evaluation should start.

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-09-30 10:26:29 -04:00
Jennifer Villa 5027863c40
Clarify what happens when a rule group takes too long to execute
Namely, call out that all subsequent evaluations will be skipped until the initial evaluation completes.

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-09-30 10:23:54 -04:00
Matthieu MOREL 0a513f827d ci(lint): enable errorlint linter on model
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-09-29 21:11:33 +00:00
Julien Pivotto a38179c4e1
Merge pull request #12901 from khallai/khallai
Fixed broken feature flag link on Functions page
2023-09-29 19:10:56 +02:00
Julien Pivotto ac0919d48c
Update docs/querying/functions.md
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-09-29 19:10:41 +02:00
Julien Pivotto 4d18ed24d2
Merge pull request #12905 from roidelapluie/up-sec-up
UI: Update some dependencies
2023-09-29 18:21:11 +02:00