Commit graph

11200 commits

Author SHA1 Message Date
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
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
George Krajcsovits 5dfa661203
Remove unused ooo.go and ooo_test.go (#366)
The code lives in ooo_head.go now.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2022-11-23 15:41:06 +00:00
Ganesh Vernekar aa3f8d0975
Cut v2.40.3
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-23 18:16:54 +05:30
George Krajcsovits 71fee62838
Comment fixes (#364)
* matcher.go: restore comment from upstream

There's no reason to remove this comment.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

* head_append.go: Cortex to Mimir

This repo is used in Mimir.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2022-11-23 12:26:20 +00:00
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
George Krajcsovits 14ea52695c
Merge pull request #355 from grafana/sync-prom-native-hist
Sync with upstream for native histograms
2022-11-23 10:20:40 +01:00
Jeanette Tan 0cd4063a02 Fix tests 2022-11-23 02:21:03 +08:00
Jeanette Tan 51cf003517 Merge remote-tracking branch 'upstream/main'
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2022-11-23 01:39:23 +08:00
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
Julien Pivotto 93e451c311
Merge pull request #11559 from codesome/merge239
Merge back release-2.39 branch
2022-11-14 09:36:32 +01:00
Julien Pivotto 32429894b1
Merge pull request #11564 from roidelapluie/keepequal
relabel: add keepequal/dropequal relabel action
2022-11-14 00:29:40 +01:00
Julius Volz 98f1d64762
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-11 20:57:49 +01:00
Julien Pivotto 005ede70de relabel: add keepequal/dropequal relabel action
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-11-10 14:41:02 +01:00
Ganesh Vernekar 717f82eef2
Merge remote-tracking branch 'upstream/main' into merge239
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-09 14:34:48 +01:00
Ganesh Vernekar b1566f761e
Merge pull request #11544 from prometheus/release-2.40
Merge back 2.40 release branch
2022-11-09 14:28:14 +01:00
Ganesh Vernekar 965274259f
Cut v2.40.1 (#11557)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-09 13:31:01 +01:00
Ganesh Vernekar 5ddfba7893
Merge pull request #11558 from codesome/cut2392
Cut v2.39.2
2022-11-09 13:20:49 +01:00
Ganesh Vernekar 6d86f4e31a
Cut v2.39.2
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-09 11:54:36 +01:00
Julien Pivotto f9ccfb5ea5
Fix alignment of atomic int64 (#11547)
* Fix atomix int64 placement
* Test main for 386

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-09 11:51:22 +01:00