Commit graph

10608 commits

Author SHA1 Message Date
Danny Staple f3f800ea6f
Terminology amendment
Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-15 16:22:40 +00: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
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
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
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
Julien Pivotto 41d0183d16
Merge pull request #11685 from roidelapluie/updatecommon
Update Prometheus/common
2022-12-09 16:37:46 +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 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
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 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
Levi Harrison f81fae2414
Add common HTTP client to AWS SDs (#11611)
* Common client in EC2 and Lightsail

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Azure -> AWS

Signed-off-by: Levi Harrison <git@leviharrison.dev>

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2022-11-22 10:09:14 -05:00
Levi Harrison 8b48e36933
Put flot under MIT (#11603)
Signed-off-by: Levi Harrison <git@leviharrison.dev>

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2022-11-20 18:09:21 -05:00
Julien Pivotto 3910b09969
Merge pull request #11596 from prometheus/release-2.40
Merge back release-2.40 branch
2022-11-20 23:35:21 +01:00
Michael Fuller 15ba7a0d2d
file sd: create and increment an inotify error counter when file-SD i… (#11066)
* file sd: create and increment an inotify error counter when file-SD is unable to watch files. Additionally, order metrics alphabetically.

Signed-off-by: Michael Fuller <mfuller@digitalocean.com>

* file.go: consistent naming and help for prometheus_sd_file_watcher_errors_total

Signed-off-by: Michael Fuller <mfuller@digitalocean.com>

Signed-off-by: Michael Fuller <mfuller@digitalocean.com>
Co-authored-by: Michael Fuller <mfuller@digitalocean.com>
2022-11-20 14:12:23 -05:00
Ganesh Vernekar a07a94a5ab
Merge pull request #11590 from codesome/cut2402
Cut v2.40.2
2022-11-17 14:34:16 +01:00
Julien Pivotto 6b53aeb012
README: Remove mentions of circleci (#11580)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-11-17 11:18:38 +01:00
Julien Pivotto 813025c499
Merge pull request #11593 from AlexandrBoltris/remove-duplicate-line
remove duplicate line
2022-11-17 09:35:58 +01:00
Alex Boltris a2fa375278 remove duplicate line
Signed-off-by: Alex Boltris <ua2fgb@gmail.com>
2022-11-16 18:04:35 +02:00
Ganesh Vernekar 42633bd05c
Merge pull request #11485 from t00350320/prometheus-office
GetRefByhash() will query a label's ref with hash value rather than lset.Hash().
2022-11-16 15:09:49 +01:00
tanghengjian 982007ecab
GetRefByhash will query a label's ref with hash value rather than lset.Hash().
Signed-off-by: tanghengjian <1040104807@qq.com>
2022-11-16 14:13:59 +01:00
Ganesh Vernekar ef886ac4b3
Cut v2.40.2
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-16 13:54:46 +01:00
Julius Volz 1eb327b99b
Fix black-on-black metric name color in dark mode (#11572)
The color should not be set explicitly at all. That way it simply inherits the
theme's default color, as before
https://github.com/prometheus/prometheus/pull/11068.

Fixes https://github.com/prometheus/prometheus/issues/11568

Signed-off-by: Julius Volz <julius.volz@gmail.com>

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-11-16 13:50:37 +01:00
Giedrius Statkevičius d1d2566055
remote/read_handler: pool input to Marshal() (#11357)
* remote/read_handler: pool input to Marshal()

Use a sync.Pool to reuse byte slices between calls to Marshal() in the
remote read handler.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

* remote: add microbenchmark for remote read handler

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2022-11-15 16:29:16 +01:00
Julien Pivotto 23f87b3278 Makefile: Fix targets order
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-11-15 09:11:11 +01:00
Oleg Zaytsev 8553a98267
Optimize postings offset table reading (#11535)
* Add BenchmarkOpenBlock

* Use specific types when reading offset table

Instead of reading a generic-ish []string, we can read a generic type
which would be specifically labels.Label.

This avoid allocating a slice that escapes to the heap, making it both
faster and more efficient in terms of memory management.

* Update error message for unexpected number of keys

* s/posting offset table/postings offset table/

* Remove useless lastKey assignment

* Use two []bytes vars, simplify

Applied PR feedback: removed generics, moved the label indices reading
to that specific test as we're not using it in production anyway, we're
just testing what we've just built.

Also using two []bytes variables for name and value that use the backing
buffer instead of using strings, this reduces allocations a lot as we
only copy them when we store them (this is optimized by the compiler).

* Fix the dumb bug

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: Marco Pracucci <marco@pracucci.com>
2022-11-14 17:48:16 +01:00
Björn Rabenstein 960b6b609a
Merge pull request #11549 from arajkumar/patch-1
Add unit for uptime column in Prometheus stats dashboard
2022-11-14 14:29:00 +01:00