File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1170,11 +1170,17 @@ func (d *Distributor) exceedsLimits(
1170
1170
if len (resp .RejectedStreams ) == 0 {
1171
1171
return false , nil , nil
1172
1172
}
1173
+ // hashesToLabels memoizes the labels for a stream hash so we can add
1174
+ // it to the reason.
1175
+ hashesToLabels := make (map [uint64 ]string )
1176
+ for _ , s := range streams {
1177
+ hashesToLabels [s .HashKeyNoShard ] = s .Stream .Labels
1178
+ }
1173
1179
reasons := make ([]string , 0 , len (resp .RejectedStreams ))
1174
1180
for _ , rejection := range resp .RejectedStreams {
1175
1181
reasons = append (reasons , fmt .Sprintf (
1176
- "stream %x was rejected because %q" ,
1177
- rejection .StreamHash ,
1182
+ "stream %s was rejected because %q" ,
1183
+ hashesToLabels [ rejection .StreamHash ] ,
1178
1184
rejection .Reason ,
1179
1185
))
1180
1186
}
You can’t perform that action at this time.
0 commit comments