Compare commits
4 Commits
6417958006
...
a1ce2cece1
Author | SHA1 | Date |
---|---|---|
Shivanth MP | a1ce2cece1 | |
Ivan Goncharov | 76b74e25d5 | |
Shivanth | 58d00f50d7 | |
Shivanth | 8b1189b8a7 |
|
@ -382,6 +382,7 @@ func TestHistogramAtomicObserve(t *testing.T) {
|
|||
return
|
||||
default:
|
||||
his.Observe(1)
|
||||
time.Sleep(time.Nanosecond)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,6 +186,9 @@ func (m *withExemplarsMetric) Write(pb *dto.Metric) error {
|
|||
case pb.Counter != nil:
|
||||
pb.Counter.Exemplar = m.exemplars[len(m.exemplars)-1]
|
||||
case pb.Histogram != nil:
|
||||
if *pb.Histogram.Schema > math.MinInt32 {
|
||||
pb.Histogram.Exemplars = append(pb.Histogram.Exemplars, m.exemplars...)
|
||||
}
|
||||
for _, e := range m.exemplars {
|
||||
// pb.Histogram.Bucket are sorted by UpperBound.
|
||||
i := sort.Search(len(pb.Histogram.Bucket), func(i int) bool {
|
||||
|
|
Loading…
Reference in New Issue