Commit graph

11747 commits

Author SHA1 Message Date
Marc Tuduri af7c31ee10
PR feedback
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:53:50 +02:00
Marc Tuduri 8fededf6ad
promql(histograms): Change sample total calculation for histograms
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:51:11 +02:00
Björn Rabenstein 16af86734f
Merge pull request #12994 from prometheus/beorn7/release
Merge release-2.48 back into main
2023-10-18 00:36:13 +02:00
Björn Rabenstein f33bffa788
Merge pull request #12891 from linasm/fix-gaps-in-histogram-equals
Fix NaN checks in [Float]Histogram.Equals method
2023-10-18 00:35:17 +02:00
Björn Rabenstein 35ec9d1f89
Merge pull request #12868 from jdellithorpe-db/alert-unit-test-doc-fix
Promtool: Fix/clarify documentation for axn notation.
2023-10-17 19:04:30 +02:00
beorn7 ca450a6d79 Merge branch 'release-2.48' into beorn7/release 2023-10-17 15:03:44 +02:00
Björn Rabenstein fb0b9fc0da
Merge pull request #12988 from zenador/release-2.48-fix-non-counter-warning
Fix possible non-counter warning for empty names and native histograms
2023-10-17 11:41:20 +02:00
Julien Pivotto a06c6680aa
Merge pull request #12990 from pnacht/scorecard-action
Add the OpenSSF Scorecard GitHub Action
2023-10-17 09:35:53 +02:00
Pedro Kaj Kjellerup Nacht d92dd108bc
Update workflow name in sync script
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-10-16 19:02:31 +00:00
Pedro Kaj Kjellerup Nacht 1ac8b5801a
Remove duplicate scorecard workflow
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-10-16 19:00:47 +00:00
Pedro Kaj Kjellerup Nacht 927fbfca53
Add scorecard.yml to sync_repo_files.sh
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-10-16 15:33:17 +00:00
Pedro Kaj Kjellerup Nacht 0968e7d907
Create scorecard.yml
Signed-off-by: Pedro Kaj Kjellerup Nacht <pedro.k.night@gmail.com>
2023-10-16 15:29:44 +00:00
George Krajcsovits 7d7b9eacff
Fix int32 overflow issues (#12978)
On a 32 bit architecture the size of int is 32 bits. Thus converting from
int64, uint64 can overflow it and flip the sign.

Try for yourself in playground:
package main

import "fmt"

func main() {
	x := int64(0x1F0000001)
	y := int64(1)
	z := int32(x - y) // numerically this is 0x1F0000000
	fmt.Printf("%v\n", z)
}

Prints -268435456 as if x was smaller.

Followup to #12650

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-10-16 16:23:26 +02:00
Jeanette Tan 9a8bd8eac6 Fix possible non-counter warning for empty names and native histograms
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-10-16 15:52:10 +08:00
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 dcaca86958
Update dependencies for 2.48 (#12964) 2023-10-15 10:53:59 -04:00
Julius Volz 5c4652c914
Fix: Exempt "_bucket" suffix from PossibleNonCounterInfo warning (#12982)
Related to PR #12152

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2023-10-15 11:32:56 +02:00
Julien Pivotto 7eb01144d1
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
2023-10-15 11:28:34 +02:00
Ziqi Zhao 1a6edff882
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>
2023-10-14 20:34:50 +02:00
Linas Medziunas 62bbb81e29 Mention bucket values in the comment
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-10-14 21:30:40 +03:00
dependabot[bot] ccfcfc7ff4
build(deps): bump github.com/prometheus/prometheus
Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.45.0 to 0.47.2.
- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/prometheus/compare/v0.45.0...v0.47.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-14 04:21:35 +00:00
Levi Harrison c9fce2c6c6
Merge pull request #11860 from mmorel-35/azure-sdk-for-go 2023-10-14 00:19:44 -04:00
Matthieu MOREL bbdc7d5902 Update Azure SDK For Go
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-10-14 03:39:31 +00:00
Paschalis Tsilias afab845e65
tsdb/agent: allow ingestion of OOO samples (#12897)
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
2023-10-13 16:33:09 +02:00
Ganesh Vernekar f5913266a1
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>
2023-10-13 14:21:35 +02:00
Levi Harrison ffa74eb12d
Merge pull request #12818 from prometheus/dependabot/go_modules/golang.org/x/sys-0.12.0
build(deps): bump golang.org/x/sys from 0.10.0 to 0.12.0
2023-10-10 21:40:39 -04:00
Levi Harrison dd5c7dd504
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
2023-10-10 21:40:18 -04:00
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
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