mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 05:47:27 -08:00
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 {
|
||||
// TODO(marctc): do we have do to the same for float histograms?
|
||||
return a.AppendHistogram(ref, lset, t, &histogram.Histogram{Sum: v}, nil)
|
||||
if value.IsStaleNaN(v) {
|
||||
if s.lastHistogramValue != 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()
|
||||
|
|
Loading…
Reference in a new issue