File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1088,15 +1088,22 @@ func (d *Distributor) prePushRelabelMiddleware(next PushFunc) PushFunc {
10881088 return err
10891089 }
10901090
1091+ validationScheme := d .limits .ValidationScheme (userID )
1092+
10911093 var removeTsIndexes []int
10921094 lb := labels .NewBuilder (labels .EmptyLabels ())
10931095 for tsIdx := 0 ; tsIdx < len (req .Timeseries ); tsIdx ++ {
10941096 ts := req .Timeseries [tsIdx ]
10951097
1096- if mrc := d .limits .MetricRelabelConfigs (userID ); len (mrc ) > 0 {
1098+ if mrcs := d .limits .MetricRelabelConfigs (userID ); len (mrcs ) > 0 {
1099+ for _ , mrc := range mrcs {
1100+ if mrc != nil {
1101+ mrc .MetricNameValidationScheme = validationScheme
1102+ }
1103+ }
10971104 mimirpb .FromLabelAdaptersToBuilder (ts .Labels , lb )
10981105 lb .Set (metaLabelTenantID , userID )
1099- keep := relabel .ProcessBuilder (lb , mrc ... )
1106+ keep := relabel .ProcessBuilder (lb , mrcs ... )
11001107 if ! keep {
11011108 removeTsIndexes = append (removeTsIndexes , tsIdx )
11021109 continue
You can’t perform that action at this time.
0 commit comments