Commit graph

12114 commits

Author SHA1 Message Date
Levi Harrison dfe3fe3ce8
Merge pull request #12848 from prometheus/dependabot/go_modules/k8s-io-815bab050d
build(deps): bump the k8s-io group with 2 updates
2023-10-10 21:38:16 -04:00
Levi Harrison 85112ee369
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
2023-10-10 21:37:02 -04:00
Bartlomiej Plotka 624b973ebf
Added ability to specify scrape protocols to accept during HTTP content type negotiation. (#12738)
* Added ability to specify scrape protocols to accept during HTTP content type negotiation.


This is done via new option in GlobalConfig and ScrapeConfig: "scrape_protocol"

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Fixed readability and log message.

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-10-10 11:16:55 +01:00
Arthur Silva Sens 4b9c19fe55
Add created timestamps to prompb (#12936)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-10 08:54:49 +01: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
Linas Medziunas ec823d9daf Update comments, bitwise comparison of float buckets
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-10-09 16:09:46 +03:00
Linas Medziunas c5c5c569fa Histogram performance: optimize floatBucketIterator
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-10-09 09:40:59 +03: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
Jonathan Ellithorpe 91650a32cc Fix/clarify documentation for axn notation
Signed-off-by: Jonathan Ellithorpe <jelli@databricks.com>
2023-10-07 08:09:30 -07: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
dependabot[bot] ede9742caf
build(deps): bump golang.org/x/sys from 0.10.0 to 0.12.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.10.0 to 0.12.0.
- [Commits](https://github.com/golang/sys/compare/v0.10.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 03:28:08 +00:00
dependabot[bot] 1179bb3068
build(deps): bump golang.org/x/net from 0.13.0 to 0.15.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.13.0 to 0.15.0.
- [Commits](https://github.com/golang/net/compare/v0.13.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 03:28:02 +00: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] 44bec3aaad
build(deps): bump github.com/aws/aws-sdk-go from 1.44.317 to 1.45.19
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.317 to 1.45.19.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.317...v1.45.19)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 23:47:30 +00:00
dependabot[bot] 7b8e65e183
build(deps): bump the k8s-io group with 2 updates
Bumps the k8s-io group with 2 updates: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go).


Updates `k8s.io/api` from 0.28.1 to 0.28.2
- [Commits](https://github.com/kubernetes/api/compare/v0.28.1...v0.28.2)

Updates `k8s.io/client-go` from 0.28.1 to 0.28.2
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.28.1...v0.28.2)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-io
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-io
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 23:46:04 +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
Julien Pivotto b6dbfcc15f
Merge pull request #12903 from roidelapluie/fix-pr-7023
rulefmt: remove unreachable code
2023-09-29 18:20:40 +02:00