Skip to content

Commit

Permalink
tests: update label value
Browse files Browse the repository at this point in the history
Signed-off-by: Nikos Angelopoulos <nikolaos.angelopoulos@grafana.com>
  • Loading branch information
NickAnge committed Nov 12, 2024
1 parent 27b7229 commit a44f512
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/proposals/reduce-multitenancy-cost.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ This is not tenant-related, it could be forwarded from the backend.

This is not tenant-related, it could be forwarded from the backend.

#### sample-out-of-bounds
#### sample-timestamp-too-old

This is not tenant-related, it could be forwarded from the backend.

Expand Down
22 changes: 11 additions & 11 deletions pkg/ingester/ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,7 @@ func TestIngester_Push(t *testing.T) {
cortex_ingester_memory_series_removed_total{user="test"} 0
# HELP cortex_discarded_samples_total The total number of samples that were discarded.
# TYPE cortex_discarded_samples_total counter
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="test"} 2
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="test"} 2
# HELP cortex_ingester_active_series Number of currently active series per user.
# TYPE cortex_ingester_active_series gauge
cortex_ingester_active_series{user="test"} 1
Expand Down Expand Up @@ -2524,7 +2524,7 @@ func TestIngester_Push(t *testing.T) {
cortex_ingester_memory_series_removed_total{user="test"} 0
# HELP cortex_discarded_samples_total The total number of samples that were discarded.
# TYPE cortex_discarded_samples_total counter
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="test"} 3
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="test"} 3
# HELP cortex_ingester_active_series Number of currently active series per user.
# TYPE cortex_ingester_active_series gauge
cortex_ingester_active_series{user="test"} 1
Expand Down Expand Up @@ -2643,7 +2643,7 @@ func TestIngester_Push(t *testing.T) {
cortex_ingester_memory_series_removed_total{user="test"} 0
# HELP cortex_discarded_samples_total The total number of samples that were discarded.
# TYPE cortex_discarded_samples_total counter
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="test"} 2
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="test"} 2
# HELP cortex_ingester_active_series Number of currently active series per user.
# TYPE cortex_ingester_active_series gauge
cortex_ingester_active_series{user="test"} 1
Expand Down Expand Up @@ -10611,8 +10611,8 @@ func TestIngester_PushWithSampledErrors(t *testing.T) {
expectedMetrics: `
# HELP cortex_discarded_samples_total The total number of samples that were discarded.
# TYPE cortex_discarded_samples_total counter
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-1"} 8
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-2"} 2
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="user-1"} 8
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="user-2"} 2
`,
},
"should soft fail on all histograms out of bound in a write request": {
Expand Down Expand Up @@ -10644,8 +10644,8 @@ func TestIngester_PushWithSampledErrors(t *testing.T) {
expectedMetrics: `
# HELP cortex_discarded_samples_total The total number of samples that were discarded.
# TYPE cortex_discarded_samples_total counter
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-1"} 4
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-2"} 1
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="user-1"} 4
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="user-2"} 1
`,
nativeHistograms: true,
},
Expand Down Expand Up @@ -10679,8 +10679,8 @@ func TestIngester_PushWithSampledErrors(t *testing.T) {
expectedMetrics: `
# HELP cortex_discarded_samples_total The total number of samples that were discarded.
# TYPE cortex_discarded_samples_total counter
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-1"} 12
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-2"} 3
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-olds",user="user-1"} 12
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="user-2"} 3
`,
nativeHistograms: true,
},
Expand Down Expand Up @@ -10716,8 +10716,8 @@ func TestIngester_PushWithSampledErrors(t *testing.T) {
expectedMetrics: `
# HELP cortex_discarded_samples_total The total number of samples that were discarded.
# TYPE cortex_discarded_samples_total counter
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-1"} 8
cortex_discarded_samples_total{group="",reason="sample-out-of-bounds",user="user-2"} 2
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="user-1"} 8
cortex_discarded_samples_total{group="",reason="sample-timestamp-too-old",user="user-2"} 2
`,
},
"should soft fail on some samples with timestamp too far in future in a write request": {
Expand Down

0 comments on commit a44f512

Please sign in to comment.