Skip to content

Commit

Permalink
Do not count ignored histograms as failed.
Browse files Browse the repository at this point in the history
Now that there is no typed counters, this makes no sense.

Signed-off-by: György Krajcsovits <[email protected]>
  • Loading branch information
krajorama committed Feb 7, 2023
1 parent dad5684 commit ca0d58b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,6 @@ func (i *Ingester) pushSamplesToAppender(userID string, timeseries []mimirpb.Pre

return wrapWithUser(err, userID)
}
} else { // ignore histograms and increase counter
stats.histogramStats.failedSamplesCount++
}
}

Expand Down
9 changes: 0 additions & 9 deletions pkg/ingester/ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,6 @@ func TestIngester_Push(t *testing.T) {
# HELP cortex_ingester_ingested_samples_total The total number of samples ingested per user.
# TYPE cortex_ingester_ingested_samples_total counter
cortex_ingester_ingested_samples_total{user="test"} 2
# HELP cortex_ingester_ingested_samples_failures_total The total number of samples that errored on ingestion per user.
# TYPE cortex_ingester_ingested_samples_failures_total counter
cortex_ingester_ingested_samples_failures_total{user="test"} 1
# HELP cortex_ingester_memory_users The current number of users in memory.
# TYPE cortex_ingester_memory_users gauge
cortex_ingester_memory_users 1
Expand Down Expand Up @@ -7383,9 +7380,6 @@ func testIngesterCanEnableIngestAndQueryNativeHistograms(t *testing.T, sampleHis
require.NoError(t, err)

expectedMetrics := `
# HELP cortex_ingester_ingested_samples_failures_total The total number of samples that errored on ingestion per user.
# TYPE cortex_ingester_ingested_samples_failures_total counter
cortex_ingester_ingested_samples_failures_total{user="1"} 1
# HELP cortex_ingester_ingested_samples_total The total number of samples ingested per user.
# TYPE cortex_ingester_ingested_samples_total counter
cortex_ingester_ingested_samples_total{user="1"} 1
Expand Down Expand Up @@ -7435,9 +7429,6 @@ func testIngesterCanEnableIngestAndQueryNativeHistograms(t *testing.T, sampleHis
require.NoError(t, err)

expectedMetrics = `
# HELP cortex_ingester_ingested_samples_failures_total The total number of samples that errored on ingestion per user.
# TYPE cortex_ingester_ingested_samples_failures_total counter
cortex_ingester_ingested_samples_failures_total{user="1"} 1
# HELP cortex_ingester_ingested_samples_total The total number of samples ingested per user.
# TYPE cortex_ingester_ingested_samples_total counter
cortex_ingester_ingested_samples_total{user="1"} 2
Expand Down

0 comments on commit ca0d58b

Please sign in to comment.