@@ -53,7 +53,7 @@ const (
53
53
exemplarTimestampInvalid = "exemplar_timestamp_invalid"
54
54
55
55
// Native Histogram specific validation reasons
56
- nativeHistogramBucketsExceeded = "native_histogram_buckets_exceeded"
56
+ nativeHistogramBucketCountLimitExceeded = "native_histogram_buckets_exceeded"
57
57
58
58
// RateLimited is one of the values for the reason to discard samples.
59
59
// Declared here to avoid duplication in ingester and distributor.
@@ -281,13 +281,13 @@ func ValidateNativeHistogram(validateMetrics *ValidateMetrics, limits *Limits, u
281
281
}
282
282
// Exceed limit.
283
283
if histogram .Schema <= cortexpb .ExponentialSchemaMin {
284
- validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketsExceeded , userID ).Inc ()
284
+ validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketCountLimitExceeded , userID ).Inc ()
285
285
return cortexpb.Histogram {}, newHistogramBucketLimitExceededError (ls , limits .MaxNativeHistogramBuckets )
286
286
}
287
287
fh := cortexpb .FloatHistogramProtoToFloatHistogram (histogram )
288
288
for len (fh .PositiveBuckets )+ len (fh .NegativeBuckets ) > limits .MaxNativeHistogramBuckets {
289
289
if fh .Schema <= cortexpb .ExponentialSchemaMin {
290
- validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketsExceeded , userID ).Inc ()
290
+ validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketCountLimitExceeded , userID ).Inc ()
291
291
return cortexpb.Histogram {}, newHistogramBucketLimitExceededError (ls , limits .MaxNativeHistogramBuckets )
292
292
}
293
293
fh = fh .ReduceResolution (fh .Schema - 1 )
@@ -303,13 +303,13 @@ func ValidateNativeHistogram(validateMetrics *ValidateMetrics, limits *Limits, u
303
303
}
304
304
// Exceed limit.
305
305
if histogram .Schema <= cortexpb .ExponentialSchemaMin {
306
- validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketsExceeded , userID ).Inc ()
306
+ validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketCountLimitExceeded , userID ).Inc ()
307
307
return cortexpb.Histogram {}, newHistogramBucketLimitExceededError (ls , limits .MaxNativeHistogramBuckets )
308
308
}
309
309
h := cortexpb .HistogramProtoToHistogram (histogram )
310
310
for len (h .PositiveBuckets )+ len (h .NegativeBuckets ) > limits .MaxNativeHistogramBuckets {
311
311
if h .Schema <= cortexpb .ExponentialSchemaMin {
312
- validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketsExceeded , userID ).Inc ()
312
+ validateMetrics .DiscardedSamples .WithLabelValues (nativeHistogramBucketCountLimitExceeded , userID ).Inc ()
313
313
return cortexpb.Histogram {}, newHistogramBucketLimitExceededError (ls , limits .MaxNativeHistogramBuckets )
314
314
}
315
315
h = h .ReduceResolution (h .Schema - 1 )
0 commit comments