diff --git a/app/vmagent/remotewrite/relabel.go b/app/vmagent/remotewrite/relabel.go index 997e9e42e..f93956977 100644 --- a/app/vmagent/remotewrite/relabel.go +++ b/app/vmagent/remotewrite/relabel.go @@ -124,7 +124,7 @@ func (rctx *relabelCtx) applyRelabeling(tss []prompbmarshal.TimeSeries, extraLab } } labels = pcs.Apply(labels, labelsLen) - labels = promrelabel.FinalizeLabels(labels[:0], labels) + labels = promrelabel.FinalizeLabels(labels[:labelsLen], labels) if len(labels) == labelsLen { // Drop the current time series, since relabeling removed all the labels. continue