Skip to content

Commit 2a7fdb0

Browse files
authored
Update thanos to latest main (#5580)
* update thanos to latest main Signed-off-by: Ben Ye <[email protected]> * update changelog Signed-off-by: Ben Ye <[email protected]> --------- Signed-off-by: Ben Ye <[email protected]>
1 parent 189e6c5 commit 2a7fdb0

File tree

11 files changed

+97
-25
lines changed

11 files changed

+97
-25
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
* [FEATURE] Ruler: Support for filtering rules in the API. #5417
3737
* [FEATURE] Compactor: Add `-compactor.ring.tokens-file-path` to store generated tokens locally. #5432
3838
* [FEATURE] Query Frontend: Add `-frontend.retry-on-too-many-outstanding-requests` to re-enqueue 429 requests if there are multiple query-schedulers available. #5496
39-
* [FEATURE] Store Gateway: Add `-blocks-storage.bucket-store.max-inflight-requests`for store gateways to reject further requests upon reaching the limit. #5553
39+
* [FEATURE] Store Gateway: Add `-blocks-storage.bucket-store.max-inflight-requests` for store gateways to reject further requests upon reaching the limit. #5553
40+
* [FEATURE] Store Gateway: Add `cortex_bucket_store_block_load_duration_seconds` histogram to track time to load blocks. #5580
4041
* [ENHANCEMENT] Distributor/Ingester: Add span on push path #5319
4142
* [ENHANCEMENT] Support object storage backends for runtime configuration file. #5292
4243
* [ENHANCEMENT] Query Frontend: Reject subquery with too small step size. #5323

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ require (
5353
github.com/stretchr/testify v1.8.4
5454
github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed
5555
github.com/thanos-io/promql-engine v0.0.0-20230821193351-e1ae4275b96e
56-
github.com/thanos-io/thanos v0.32.4-0.20230921182036-6257767ec9d0
56+
github.com/thanos-io/thanos v0.32.4-0.20230926060504-20d29008068f
5757
github.com/uber/jaeger-client-go v2.30.0+incompatible
5858
github.com/weaveworks/common v0.0.0-20221201103051-7c2720a9024d
5959
go.etcd.io/etcd/api/v3 v3.5.9

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,8 @@ github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed h1:iWQdY3S6DpWj
12121212
github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed/go.mod h1:oJ82xgcBDzGJrEgUsjlTj6n01+ZWUMMUR8BlZzX5xDE=
12131213
github.com/thanos-io/promql-engine v0.0.0-20230821193351-e1ae4275b96e h1:kwsFCU8eSkZehbrAN3nXPw5RdMHi/Bok/y8l2C4M+gk=
12141214
github.com/thanos-io/promql-engine v0.0.0-20230821193351-e1ae4275b96e/go.mod h1:+T/ZYNCGybT6eTsGGvVtGb63nT1cvUmH6MjqRrcQoKw=
1215-
github.com/thanos-io/thanos v0.32.4-0.20230921182036-6257767ec9d0 h1:T9Vot+BQao6M6j8F0JQbseAqtniOw1Csz+QHRRRwF48=
1216-
github.com/thanos-io/thanos v0.32.4-0.20230921182036-6257767ec9d0/go.mod h1:Px5Boq60s+2WwR+V4v4oxgmxfw9WHrwMwjRou6pkUNw=
1215+
github.com/thanos-io/thanos v0.32.4-0.20230926060504-20d29008068f h1:OdZZLgF2eYIiad7h4WeUPkew7Uq6F9vFPg3aDZfMQLY=
1216+
github.com/thanos-io/thanos v0.32.4-0.20230926060504-20d29008068f/go.mod h1:Px5Boq60s+2WwR+V4v4oxgmxfw9WHrwMwjRou6pkUNw=
12171217
github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU=
12181218
github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab/go.mod h1:eheTFp954zcWZXCU8d0AT76ftsQOTo4DTqkN/h3k1MY=
12191219
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=

pkg/storegateway/bucket_store_metrics.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type BucketStoreMetrics struct {
1616
blockLoadFailures *prometheus.Desc
1717
blockDrops *prometheus.Desc
1818
blockDropFailures *prometheus.Desc
19+
blockLoadDuration *prometheus.Desc
1920
blocksLoaded *prometheus.Desc
2021
seriesDataTouched *prometheus.Desc
2122
seriesDataFetched *prometheus.Desc
@@ -75,6 +76,10 @@ func NewBucketStoreMetrics() *BucketStoreMetrics {
7576
"cortex_bucket_store_block_drop_failures_total",
7677
"Total number of local blocks that failed to be dropped.",
7778
nil, nil),
79+
blockLoadDuration: prometheus.NewDesc(
80+
"cortex_bucket_store_block_load_duration_seconds",
81+
"The total time taken to load a block in seconds.",
82+
nil, nil),
7883
blocksLoaded: prometheus.NewDesc(
7984
"cortex_bucket_store_blocks_loaded",
8085
"Number of currently loaded blocks.",
@@ -228,6 +233,7 @@ func (m *BucketStoreMetrics) Describe(out chan<- *prometheus.Desc) {
228233
out <- m.blockLoadFailures
229234
out <- m.blockDrops
230235
out <- m.blockDropFailures
236+
out <- m.blockLoadDuration
231237
out <- m.blocksLoaded
232238
out <- m.seriesDataTouched
233239
out <- m.seriesDataFetched
@@ -274,6 +280,7 @@ func (m *BucketStoreMetrics) Collect(out chan<- prometheus.Metric) {
274280
data.SendSumOfCounters(out, m.blockLoadFailures, "thanos_bucket_store_block_load_failures_total")
275281
data.SendSumOfCounters(out, m.blockDrops, "thanos_bucket_store_block_drops_total")
276282
data.SendSumOfCounters(out, m.blockDropFailures, "thanos_bucket_store_block_drop_failures_total")
283+
data.SendSumOfHistograms(out, m.blockLoadDuration, "thanos_bucket_store_block_load_duration_seconds")
277284

278285
data.SendSumOfGaugesPerUser(out, m.blocksLoaded, "thanos_bucket_store_blocks_loaded")
279286

pkg/storegateway/bucket_store_metrics_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ func TestBucketStoreMetrics(t *testing.T) {
4141
# HELP cortex_bucket_store_block_drops_total Total number of local blocks that were dropped.
4242
# TYPE cortex_bucket_store_block_drops_total counter
4343
cortex_bucket_store_block_drops_total 90076
44+
# HELP cortex_bucket_store_block_load_duration_seconds The total time taken to load a block in seconds.
45+
# TYPE cortex_bucket_store_block_load_duration_seconds histogram
46+
cortex_bucket_store_block_load_duration_seconds_bucket{le="0.1"} 0
47+
cortex_bucket_store_block_load_duration_seconds_bucket{le="0.5"} 0
48+
cortex_bucket_store_block_load_duration_seconds_bucket{le="1"} 0
49+
cortex_bucket_store_block_load_duration_seconds_bucket{le="10"} 0
50+
cortex_bucket_store_block_load_duration_seconds_bucket{le="20"} 0
51+
cortex_bucket_store_block_load_duration_seconds_bucket{le="30"} 0
52+
cortex_bucket_store_block_load_duration_seconds_bucket{le="60"} 0
53+
cortex_bucket_store_block_load_duration_seconds_bucket{le="120"} 0
54+
cortex_bucket_store_block_load_duration_seconds_bucket{le="+Inf"} 3
55+
cortex_bucket_store_block_load_duration_seconds_sum 112595
56+
cortex_bucket_store_block_load_duration_seconds_count 3
4457
4558
# HELP cortex_bucket_store_block_drop_failures_total Total number of local blocks that failed to be dropped.
4659
# TYPE cortex_bucket_store_block_drop_failures_total counter
@@ -601,6 +614,7 @@ func populateMockedBucketStoreMetrics(base float64) *prometheus.Registry {
601614
m.blockLoadFailures.Add(3 * base)
602615
m.blockDrops.Add(4 * base)
603616
m.blockDropFailures.Add(5 * base)
617+
m.blockLoadDuration.Observe(5 * base)
604618
m.seriesDataTouched.WithLabelValues("touched-a").Observe(6 * base)
605619
m.seriesDataTouched.WithLabelValues("touched-b").Observe(7 * base)
606620
m.seriesDataTouched.WithLabelValues("touched-c").Observe(8 * base)
@@ -684,6 +698,7 @@ type mockedBucketStoreMetrics struct {
684698
blockLoadFailures prometheus.Counter
685699
blockDrops prometheus.Counter
686700
blockDropFailures prometheus.Counter
701+
blockLoadDuration prometheus.Histogram
687702
seriesDataTouched *prometheus.HistogramVec
688703
seriesDataFetched *prometheus.HistogramVec
689704
seriesDataSizeTouched *prometheus.HistogramVec
@@ -741,6 +756,11 @@ func newMockedBucketStoreMetrics(reg prometheus.Registerer) *mockedBucketStoreMe
741756
Name: "thanos_bucket_store_block_drop_failures_total",
742757
Help: "Total number of local blocks that failed to be dropped.",
743758
})
759+
m.blockLoadDuration = promauto.With(reg).NewHistogram(prometheus.HistogramOpts{
760+
Name: "thanos_bucket_store_block_load_duration_seconds",
761+
Help: "The total time taken to load a block in seconds.",
762+
Buckets: []float64{0.1, 0.5, 1, 10, 20, 30, 60, 120},
763+
})
744764
m.blocksLoaded = promauto.With(reg).NewGauge(prometheus.GaugeOpts{
745765
Name: "thanos_bucket_store_blocks_loaded",
746766
Help: "Number of currently loaded blocks.",

vendor/github.com/thanos-io/thanos/pkg/block/indexheader/binary_reader.go

Lines changed: 17 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thanos-io/thanos/pkg/store/bucket.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thanos-io/thanos/pkg/store/cache/cache.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thanos-io/thanos/pkg/store/cache/inmemory.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thanos-io/thanos/pkg/store/cache/memcached.go

Lines changed: 25 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)