@@ -52,6 +52,7 @@ const (
52
52
reasonTooManyRequests = "too_many_requests"
53
53
reasonResourceExhausted = "resource_exhausted"
54
54
reasonTimeRangeExceeded = "time_range_exceeded"
55
+ reasonResponseSizeExceeded = "response_size_exceeded"
55
56
reasonTooManySamples = "too_many_samples"
56
57
reasonSeriesFetched = "series_fetched"
57
58
reasonChunksFetched = "chunks_fetched"
@@ -61,12 +62,13 @@ const (
61
62
reasonChunksLimitStoreGateway = "store_gateway_chunks_limit"
62
63
reasonBytesLimitStoreGateway = "store_gateway_bytes_limit"
63
64
64
- limitTooManySamples = `query processing would load too many samples into memory`
65
- limitTimeRangeExceeded = `the query time range exceeds the limit`
66
- limitSeriesFetched = `the query hit the max number of series limit`
67
- limitChunksFetched = `the query hit the max number of chunks limit`
68
- limitChunkBytesFetched = `the query hit the aggregated chunks size limit`
69
- limitDataBytesFetched = `the query hit the aggregated data size limit`
65
+ limitTooManySamples = `query processing would load too many samples into memory`
66
+ limitTimeRangeExceeded = `the query time range exceeds the limit`
67
+ limitResponseSizeExceeded = `the query response size exceeds limit`
68
+ limitSeriesFetched = `the query hit the max number of series limit`
69
+ limitChunksFetched = `the query hit the max number of chunks limit`
70
+ limitChunkBytesFetched = `the query hit the aggregated chunks size limit`
71
+ limitDataBytesFetched = `the query hit the aggregated data size limit`
70
72
71
73
// Store gateway limits.
72
74
limitSeriesStoreGateway = `exceeded series limit`
@@ -529,6 +531,8 @@ func (f *Handler) reportQueryStats(r *http.Request, source, userID string, query
529
531
reason = reasonTooManySamples
530
532
} else if strings .Contains (errMsg , limitTimeRangeExceeded ) {
531
533
reason = reasonTimeRangeExceeded
534
+ } else if strings .Contains (errMsg , limitResponseSizeExceeded ) {
535
+ reason = reasonResponseSizeExceeded
532
536
} else if strings .Contains (errMsg , limitSeriesFetched ) {
533
537
reason = reasonSeriesFetched
534
538
} else if strings .Contains (errMsg , limitChunksFetched ) {
0 commit comments