Skip to content

Fix cortex_ingester_tsdb_head_samples_appended_total metric dimentions #5952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* [ENHANCEMENT] KV: Etcd Added etcd.ping-without-stream-allowed parameter to disable/enable PermitWithoutStream #5933
* [CHANGE] Upgrade Dockerfile Node version from 14x to 18x. #5906
* [BUGFIX] Configsdb: Fix endline issue in db password. #5920
* [BUGFIX] Ingester: Fix `user` and `type` labels for the `cortex_ingester_tsdb_head_samples_appended_total` TSDB metric. #5952


## 1.17.0 2024-04-30
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ func newTSDBMetrics(r prometheus.Registerer) *tsdbMetrics {
tsdbSamplesAppended: prometheus.NewDesc(
"cortex_ingester_tsdb_head_samples_appended_total",
"Total number of appended samples.",
[]string{"type", "user"}, nil),
[]string{"user", "type"}, nil),
tsdbOutOfOrderSamplesAppended: prometheus.NewDesc(
"cortex_ingester_tsdb_head_out_of_order_samples_appended_total",
"Total number of appended out of order samples.",
Expand Down
10 changes: 5 additions & 5 deletions pkg/ingester/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ func TestTSDBMetrics(t *testing.T) {
cortex_ingester_tsdb_head_out_of_order_samples_appended_total{user="user3"} 102
# HELP cortex_ingester_tsdb_head_samples_appended_total Total number of appended samples.
# TYPE cortex_ingester_tsdb_head_samples_appended_total counter
cortex_ingester_tsdb_head_samples_appended_total{type="user1",user="float"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="user2",user="float"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="user3",user="float"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="float",user="user1"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="float",user="user2"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="float",user="user3"} 101
# HELP cortex_ingester_tsdb_checkpoint_deletions_failed_total Total number of TSDB checkpoint deletions that failed.
# TYPE cortex_ingester_tsdb_checkpoint_deletions_failed_total counter
cortex_ingester_tsdb_checkpoint_deletions_failed_total 1586096
Expand Down Expand Up @@ -496,8 +496,8 @@ func TestTSDBMetricsWithRemoval(t *testing.T) {
cortex_ingester_tsdb_head_out_of_order_samples_appended_total{user="user2"} 102
# HELP cortex_ingester_tsdb_head_samples_appended_total Total number of appended samples.
# TYPE cortex_ingester_tsdb_head_samples_appended_total counter
cortex_ingester_tsdb_head_samples_appended_total{type="user1",user="float"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="user2",user="float"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="float",user="user1"} 101
cortex_ingester_tsdb_head_samples_appended_total{type="float",user="user2"} 101

# HELP cortex_ingester_tsdb_checkpoint_deletions_failed_total Total number of TSDB checkpoint deletions that failed.
# TYPE cortex_ingester_tsdb_checkpoint_deletions_failed_total counter
Expand Down
Loading