mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-14 17:44:06 -08:00
fix label ranging
Signed-off-by: Callum Styan <callumstyan@gmail.com> Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
parent
a9ca52d062
commit
fbb81cbacc
|
@ -1034,12 +1034,12 @@ func min64WriteRequestToWriteRequest(redReq *prompb.MinimizedWriteRequestFixed64
|
||||||
|
|
||||||
for i, rts := range redReq.Timeseries {
|
for i, rts := range redReq.Timeseries {
|
||||||
|
|
||||||
lbls := Uint64RefToLabels(redReq.Symbols, rts.LabelSymbols)
|
Uint64RefToLabels(redReq.Symbols, rts.LabelSymbols).Range(func(l labels.Label) {
|
||||||
ls := make([]prompb.Label, len(lbls))
|
req.Timeseries[i].Labels = append(req.Timeseries[i].Labels, prompb.Label{
|
||||||
for j, l := range lbls {
|
Name: l.Name,
|
||||||
ls[j].Name = l.Name
|
Value: l.Value,
|
||||||
ls[j].Value = l.Value
|
})
|
||||||
}
|
})
|
||||||
|
|
||||||
exemplars := make([]prompb.Exemplar, len(rts.Exemplars))
|
exemplars := make([]prompb.Exemplar, len(rts.Exemplars))
|
||||||
// TODO handle exemplars
|
// TODO handle exemplars
|
||||||
|
@ -1054,7 +1054,6 @@ func min64WriteRequestToWriteRequest(redReq *prompb.MinimizedWriteRequestFixed64
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
req.Timeseries[i].Labels = ls
|
|
||||||
req.Timeseries[i].Samples = rts.Samples
|
req.Timeseries[i].Samples = rts.Samples
|
||||||
req.Timeseries[i].Exemplars = exemplars
|
req.Timeseries[i].Exemplars = exemplars
|
||||||
req.Timeseries[i].Histograms = rts.Histograms
|
req.Timeseries[i].Histograms = rts.Histograms
|
||||||
|
|
Loading…
Reference in a new issue