tsdb: Add staleness handling for FloatHistogram
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
This commit is contained in:
parent
e555469ba1
commit
2820e327db
|
@ -350,9 +350,12 @@ func (a *headAppender) Append(ref storage.SeriesRef, lset labels.Labels, t int64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if value.IsStaleNaN(v) && s.lastHistogramValue != nil {
|
if value.IsStaleNaN(v) {
|
||||||
// TODO(marctc): do we have do to the same for float histograms?
|
if s.lastHistogramValue != nil {
|
||||||
return a.AppendHistogram(ref, lset, t, &histogram.Histogram{Sum: v}, nil)
|
return a.AppendHistogram(ref, lset, t, &histogram.Histogram{Sum: v}, nil)
|
||||||
|
} else if s.lastFloatHistogramValue != nil {
|
||||||
|
return a.AppendHistogram(ref, lset, t, nil, &histogram.FloatHistogram{Sum: v})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s.Lock()
|
s.Lock()
|
||||||
|
|
Loading…
Reference in New Issue