| 53 | } |
| 54 | |
| 55 | func (a *PusherAppender) AppendHistogram(_ storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram, fh *histogram.FloatHistogram) (storage.SeriesRef, error) { |
| 56 | if h == nil && fh == nil { |
| 57 | return 0, errors.New("no histogram") |
| 58 | } |
| 59 | if h != nil { |
| 60 | a.histograms = append(a.histograms, cortexpb.WrappedHistogram{Histogram: cortexpb.HistogramToHistogramProto(t, h)}) |
| 61 | } else { |
| 62 | a.histograms = append(a.histograms, cortexpb.WrappedHistogram{Histogram: cortexpb.FloatHistogramToHistogramProto(t, fh)}) |
| 63 | } |
| 64 | a.histogramLabels = append(a.histogramLabels, l) |
| 65 | return 0, nil |
| 66 | } |
| 67 | |
| 68 | func (a *PusherAppender) Append(_ storage.SeriesRef, l labels.Labels, t int64, v float64) (storage.SeriesRef, error) { |
| 69 | a.labels = append(a.labels, l) |