(ref storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram, fh *histogram.FloatHistogram)
| 511 | } |
| 512 | |
| 513 | func (app *remoteWriteAppender) AppendHistogram(ref storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram, fh *histogram.FloatHistogram) (storage.SeriesRef, error) { |
| 514 | var err error |
| 515 | if t > app.maxTime { |
| 516 | return 0, fmt.Errorf("%w: timestamp is too far in the future", storage.ErrOutOfBounds) |
| 517 | } |
| 518 | |
| 519 | if h != nil && histogram.IsExponentialSchemaReserved(h.Schema) && h.Schema > histogram.ExponentialSchemaMax { |
| 520 | if err = h.ReduceResolution(histogram.ExponentialSchemaMax); err != nil { |
| 521 | return 0, err |
| 522 | } |
| 523 | } |
| 524 | if fh != nil && histogram.IsExponentialSchemaReserved(fh.Schema) && fh.Schema > histogram.ExponentialSchemaMax { |
| 525 | if err = fh.ReduceResolution(histogram.ExponentialSchemaMax); err != nil { |
| 526 | return 0, err |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | if ref, err = app.Appender.AppendHistogram(ref, l, t, h, fh); err != nil { |
| 531 | return 0, err |
| 532 | } |
| 533 | return ref, nil |
| 534 | } |
| 535 | |
| 536 | func (app *remoteWriteAppender) AppendExemplar(ref storage.SeriesRef, l labels.Labels, e exemplar.Exemplar) (storage.SeriesRef, error) { |
| 537 | if e.Ts > app.maxTime { |
nothing calls this directly
no test coverage detected