Skip to content

Commit

Permalink
Store: Add a few objectives for Store's data touched/fetched amount a…
Browse files Browse the repository at this point in the history
…nd sizes (thanos-io#5819)

* Add a few objectives for Store's data touched/fetched

The intent is to provide some metrics that will help inform users when setting values for the flags `store.grpc.series-sample-limit` and `store.grpc.touched-series-limit`.

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

* Update CHANGELOG

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

* Update some metric's help text

Co-authored-by: Moad Zardab <zardab12@hotmail.com>
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

* Remove quantiles from redundant metric

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

* Fix spelling

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

* Fix some metric help texts

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
Co-authored-by: Moad Zardab <zardab12@hotmail.com>
  • Loading branch information
2 people authored and Nathaniel Graham committed May 18, 2023
1 parent 2ddc834 commit 02cf7db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
### Removed

- [#5824](https://github.com/thanos-io/thanos/pull/5824) Mixin: Remove noisy `ThanosReceiveTrafficBelowThreshold` alert.
- [#5819](https://github.com/thanos-io/thanos/pull/5819) Store: Add a few objectives for Store's data touched/fetched amount and sizes. They are: 50, 95, and 99 quantiles.

## [v0.29.0](https://github.com/thanos-io/thanos/tree/release-0.29) - 2022.11.03

Expand Down
20 changes: 12 additions & 8 deletions pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,25 @@ func newBucketStoreMetrics(reg prometheus.Registerer) *bucketStoreMetrics {
})

m.seriesDataTouched = promauto.With(reg).NewSummaryVec(prometheus.SummaryOpts{
Name: "thanos_bucket_store_series_data_touched",
Help: "How many items of a data type in a block were touched for a single series request.",
Name: "thanos_bucket_store_series_data_touched",
Help: "Number of items of a data type touched to fulfill a single Store API series request.",
Objectives: map[float64]float64{0.50: 0.1, 0.95: 0.1, 0.99: 0.001},
}, []string{"data_type"})
m.seriesDataFetched = promauto.With(reg).NewSummaryVec(prometheus.SummaryOpts{
Name: "thanos_bucket_store_series_data_fetched",
Help: "How many items of a data type in a block were fetched for a single series request.",
Name: "thanos_bucket_store_series_data_fetched",
Help: "Number of items of a data type retrieved to fulfill a single Store API series request.",
Objectives: map[float64]float64{0.50: 0.1, 0.95: 0.1, 0.99: 0.001},
}, []string{"data_type"})

m.seriesDataSizeTouched = promauto.With(reg).NewSummaryVec(prometheus.SummaryOpts{
Name: "thanos_bucket_store_series_data_size_touched_bytes",
Help: "Size of all items of a data type in a block were touched for a single series request.",
Name: "thanos_bucket_store_series_data_size_touched_bytes",
Help: "Total size of items of a data type touched to fulfill a single Store API series request in Bytes.",
Objectives: map[float64]float64{0.50: 0.1, 0.95: 0.1, 0.99: 0.001},
}, []string{"data_type"})
m.seriesDataSizeFetched = promauto.With(reg).NewSummaryVec(prometheus.SummaryOpts{
Name: "thanos_bucket_store_series_data_size_fetched_bytes",
Help: "Size of all items of a data type in a block were fetched for a single series request.",
Name: "thanos_bucket_store_series_data_size_fetched_bytes",
Help: "Total size of items of a data type fetched to fulfill a single Store API series request in Bytes.",
Objectives: map[float64]float64{0.50: 0.1, 0.95: 0.1, 0.99: 0.001},
}, []string{"data_type"})

m.seriesBlocksQueried = promauto.With(reg).NewSummary(prometheus.SummaryOpts{
Expand Down

0 comments on commit 02cf7db

Please sign in to comment.