Commit graph

12540 commits

Author SHA1 Message Date
Julien Pivotto bd2bcfc166
Merge pull request #11715 from roidelapluie/merge-240
Merge release 2.40 into main
2022-12-14 11:27:52 +01:00
Julien Pivotto 475cfe8a6b Merge remote-tracking branch 'origin/release-2.40'
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-14 11:22:01 +01:00
Frederic Branczyk 97912cf388
Merge pull request #11713 from roidelapluie/update-kube
Update kubernetes dependencies
2022-12-14 11:17:00 +01:00
Julien Pivotto 3677d61a4b Update kubernetes dependencies
A new API is available for AddEventHandlers, to get errors but also be
able to cancel handlers.

Doing the easy thing for the release, which is just to log errors.

We could see how to improve this in the future to handle the errors
properly and cancel the handlers.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-14 10:46:20 +01:00
Ganesh Vernekar db99fc43e4
Merge pull request #11632 from bboreham/improve-bbss
tsdb: improve blockBaseSeriesSet scan
2022-12-14 15:05:27 +05:30
Ganesh Vernekar 54739a1465
Merge pull request #11674 from bboreham/fix-tsdb-test-mem
tsdb tests: allocate more reasonable sample slice
2022-12-14 15:01:04 +05:30
Julien Pivotto ab239ac5d4
Merge pull request #11707 from roidelapluie/newbugfix
Release 2.40.7
2022-12-14 09:46:10 +01:00
Julien Pivotto 106d06a032 Release 2.40.7
We have 2 bugfixes,  one which is important for Windows users and
another one on native histograms. I think it is worth cutting another
bugfix release before 2.41 comes out.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-14 09:45:26 +01:00
Julien Levesy 8c5da5e078
feat(config): allow no remote write configs
Signed-off-by: Julien Levesy <jlevesy@gmail.com>
2022-12-13 18:41:06 +01:00
Danny Staple b614fdd8a7
Update unit_testing_rules.md
Update the shorthand, and note the different behaviour between missing samples and numbers.

Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-13 15:52:40 +00:00
Julien Pivotto c1aa4b1061
Merge pull request #11699 from prometheus/beorn7/histogram2
histograms: Improve tests and fix exposed bugs
2022-12-13 12:49:04 +01:00
Julien Pivotto b95f261f5c
Merge pull request #11704 from roidelapluie/windns2
Do not build with netgo on Windows
2022-12-13 12:46:55 +01:00
Danny Staple 300d6e4390
Add an explanation to the expanding notation
After some team discussion, we found this to be a useful was to explain the samples.

Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-13 11:11:13 +00:00
Julien Pivotto 77dd468cc6
Merge pull request #11672 from bboreham/notifier-unused-code
notifier: remove unused code
2022-12-12 22:50:04 +01:00
Julien Pivotto f113d58a57 Do not build with netgo on Windows
Fix #11480

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-12 18:14:38 +01:00
John Carlo Roberto 924ba90c3f
Add link to best practices in "Defining Recording Rules" page (#11696)
* docs: Add link to best practices in "Defining Recording Rules" page

Signed-off-by: John Carlo Roberto <10111643+Irizwaririz@users.noreply.github.com>

* docs: Improve wording

Signed-off-by: John Carlo Roberto <10111643+Irizwaririz@users.noreply.github.com>

Signed-off-by: John Carlo Roberto <10111643+Irizwaririz@users.noreply.github.com>
2022-12-12 16:08:45 +01:00
Julien Pivotto de25530d67
Merge pull request #11694 from roidelapluie/windns
Do not build with netgo on Windows
2022-12-12 14:39:36 +01:00
Julien Pivotto a971bdd5f5 Do not build with netgo on Windows
Fix #11480

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-12 12:33:18 +01:00
beorn7 5f366e9b62 histograms: Improve tests and fix exposed bugs
This adds negative buckets and access of float histograms to
TestHistogramChunkSameBuckets and TestHistogramChunkBucketChanges.

It also exercises a specific pattern of reusing an iterator (one where
no access has happened).

This exposes two bugs (where entries for positive buckets where used
where the corresponding entries for negative buckets should have been
used). One was fixed in #11627 (not merged), which triggered the work
in this commit.

This commit fixes both issues, so #11627 can be closed.

It also simplifies the code in the histogramIterator.Next method that
aims to recycle existing slice capacity.

Furthermore, this is on top of the release-2.40 branch because we
should probably cut a bugfix release for this.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-12-12 00:08:23 +01:00
Julien Pivotto 41d0183d16
Merge pull request #11685 from roidelapluie/updatecommon
Update Prometheus/common
2022-12-09 16:37:46 +01:00
Julien Pivotto e1506e7be8
Merge pull request #11691 from roidelapluie/december6security240
Release 2.40.6 with security fixes
2022-12-09 13:42:52 +01:00
Julien Pivotto 5198eac6f4 Release 2.40.6 with security fixes
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-09 11:04:13 +01:00
Julien Pivotto 01382cadc3 Update Prometheus/common
- Check if TLS certificate and key file have been modified
  https://github.com/prometheus/common/issues/345
- Add the ability to specify the maximum acceptable TLS version
  https://github.com/prometheus/common/issues/414

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-08 14:51:17 +01:00
Julien Pivotto bb323db613
Merge pull request #11074 from damnever/fix/datamodelvalidation
Validate the metric name and label names
2022-12-08 14:31:12 +01:00
Xiaochao Dong (@damnever) 9979024a30 Report error if the series contains invalid metric names or labels during scrape
Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
2022-12-08 20:01:20 +08:00
Julien Pivotto 7189f919dd
Merge pull request #11635 from bboreham/note-hash
labels: note that Hash may change
2022-12-08 11:16:48 +01:00
Julien Pivotto 0b302f8a39
Merge pull request #11662 from prometheus/release-2.40
Merge back release-2.40 branch again
2022-12-06 17:30:51 +01:00
Bryan Boreham 9853888f9b tsdb tests: allocate more reasonable sample slice
Typical parameters are one hour  by 1 minute step, where the
function would allocate a slice of 3.6 million samples instead of 60.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-12-05 17:15:02 +00:00
Bryan Boreham 9619d3fd3b notifier: remove unused code
None of the actions on `lb` have any effect because its result is not
read.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-12-04 17:35:36 +00:00
Ganesh Vernekar 72a48321da
Merge pull request #11633 from pstibrany/populate-error
Enhance "cannot populate chunk" error message to include source block ID
2022-12-02 16:28:52 +05:30
Ganesh Vernekar 44af4716c8
Cut v2.40.5 (#11646)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-12-01 18:16:11 +05:30
Ganesh Vernekar 0e4cbd0f4c
Merge pull request #11643 from codesome/histochunkreset
Fix reset of a histogram chunk iterator
2022-11-30 21:59:40 +05:30
Paweł Krupa (paulfantom) b6caa6cabf documentation/mixin: use prometheus metrics for dashboard variables
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
2022-11-30 14:02:58 +01:00
Ganesh Vernekar b8b0d45d69
Fix reset of a histogram chunk iterator
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-30 17:50:05 +05:30
Aaron George d542483e8c k8s discovery: Ensure that the pod IP is in the status before adding to target group
Signed-off-by: Aaron George <aaron@ometria.com>

Signed-off-by: Aaron George <aaron@ometria.com>
2022-11-30 09:04:14 +00:00
Julien Pivotto 0372e259ba
Merge pull request #11634 from prometheus/release-2.40
Merge release-2.40 branch into main
2022-11-29 15:54:58 +01:00
Julien Pivotto 414d31aee6
Merge pull request from GHSA-4v48-4q5m-8vx4
Fix Basic Authentication Bypass (CVE-2022-46146)
2022-11-29 11:23:48 +01:00
Julien Pivotto 31a2db3ae9 Fix Basic Authentication Bypass (CVE-2022-46146)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-11-29 10:44:09 +01:00
Bryan Boreham 6bdecf377c
Switch from 'sanity' to more inclusive lanuage (#9376)
* Switch from 'sanity' to more inclusive lanuage

"Removing ableist language in code is important; it helps to create and
maintain an environment that welcomes all developers of all backgrounds,
while emphasizing that we as developers select the most articulate,
precise, descriptive language we can rather than relying on metaphors.

The phrase sanity check is ableist, and unnecessarily references mental
health in our code bases. It denotes that people with mental illnesses
are inferior, wrong, or incorrect, and the phrase sanity continues to be
used by employers and other individuals to discriminate against these
people."

From https://gist.github.com/seanmhanson/fe370c2d8bd2b3228680e38899baf5cc

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-11-28 17:09:18 +00:00
Bryan Boreham 8d4140a06e labels: note that Hash may change
For performance reasons we may use a different implementation of Hash()
in future, so note this so callers can be warned.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-11-28 16:17:32 +00:00
Ganesh Vernekar 247201005c
Merge pull request #11631 from bboreham/size-meta-alloc
tsdb: use smaller allocation in blockBaseSeriesSet
2022-11-28 16:12:55 +05:30
Peter Štibraný af838ccf83 Include source block in error message when loading chunk fails.
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
2022-11-28 09:12:54 +01:00
Bryan Boreham 1226922ff5 tsdb: improve blockBaseSeriesSet scan
Inverting the test for chunks deleted by tombstones makes all three
rejections consistent, and also avoids the case where a chunk is
excluded but still causes `trimFront` or `trimBack` to be set.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-11-26 15:23:02 +00:00
Bryan Boreham 0c05f95e92 tsdb: use smaller allocation in blockBaseSeriesSet
This reduces garbage, hence goes faster, when a short time range is
required compared to the amount of chunks in the block. For example
recording rules and alerts often look only at the last few minutes.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-11-26 14:56:22 +00:00
Bryan Boreham dfa5cd55db
Merge pull request #11504 from kaffarell/fix/contributing-docs
docs: changed from 'go install' to 'go get' in contributing.md
2022-11-25 16:42:40 +00:00
Ganesh Vernekar 84e95d8cbc
Merge pull request #11623 from codesome/2403
Cut v2.40.3
2022-11-24 11:01:58 +05:30
Ganesh Vernekar aa3f8d0975
Cut v2.40.3
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-23 18:16:54 +05:30
Ganesh Vernekar ad79fb9f25
Do not error on empty chunk during iteration in populateWithDelChunkSeriesIterator
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-23 17:32:28 +05:30
Ganesh Vernekar d0e683e26d
Add TestCompactHeadWithDeletion to test compaction failure after deletion
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-23 17:31:18 +05:30
Julien Pivotto 30b31cae93
Merge pull request #11579 from roidelapluie/tgo
Makefile: Fix targets order
2022-11-22 17:00:07 +01:00