Commit graph

11041 commits

Author SHA1 Message Date
Julius Volz 1a2c645dfa Correctly handle error unwrapping in rules and remote write receiver
errors.Unwrap() actually dangerously returns nil if the error does not have an
Unwrap() method, which is the case in at least one of these places where I
noticed that no error was being logged at all when it should have.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-12-15 12:50:55 +01:00
Julien Pivotto c3fac587ef
Merge pull request #11723 from alanprot/span-fix
Finishing evalSpanTimer always before return
2022-12-14 22:53:10 +01:00
Alan Protasio 8460807475 fix blank lines
Signed-off-by: Alan Protasio <approtas@amazon.com>
2022-12-14 13:24:10 -08:00
Alan Protasio f8f4ac14a8 Finishing evalSpanTimer always before return
Signed-off-by: Alan Protasio <approtas@amazon.com>
2022-12-14 13:10:35 -08:00
Julien Pivotto 29707b1569 Makefile: Avoid the use of --transform for tar
This makes it compatible with macos tar as well

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-14 16:35:13 +01:00
Julien Pivotto 88ee72dea3
Merge pull request #11712 from roidelapluie/update-deps-for-41
Update go dependencies for 2.41
2022-12-14 14:22:26 +01:00
Danny Staple 7269a6e21a
Fix the output example
(based on empirical unit testing)

Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-14 12:21:34 +00:00
Danny Staple 87b9f1d24a
Fix typo I introduced in unit testing rules.
Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-14 12:20:28 +00:00
Julien Pivotto 9e26adfd20
Add myself as release shepherd (#11693)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-14 12:05:16 +01:00
Julien Pivotto c396c3e32f Update go dependencies before 2.41
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-14 11:30:36 +01:00
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
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
Justin Lei 0db77b4c76
Merge pull request #368 from grafana/leizor/query-sharding-test
Add tests for query sharding
2022-11-29 07:19:24 -08: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
Justin Lei d953c4f8e4 Add tests for query sharding
Signed-off-by: Justin Lei <justin.lei@grafana.com>
2022-11-28 08:33:48 -08: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