MCPcopy
hub / github.com/prometheus/prometheus / AppendExemplar

Method AppendExemplar

storage/remote/write_handler.go:536–546  ·  view source on GitHub ↗
(ref storage.SeriesRef, l labels.Labels, e exemplar.Exemplar)

Source from the content-addressed store, hash-verified

534}
535
536func (app *remoteWriteAppender) AppendExemplar(ref storage.SeriesRef, l labels.Labels, e exemplar.Exemplar) (storage.SeriesRef, error) {
537 if e.Ts > app.maxTime {
538 return 0, fmt.Errorf("%w: timestamp is too far in the future", storage.ErrOutOfBounds)
539 }
540
541 ref, err := app.Appender.AppendExemplar(ref, l, e)
542 if err != nil {
543 return 0, err
544 }
545 return ref, nil
546}
547
548type remoteWriteAppenderV2 struct {
549 storage.AppenderV2

Callers 1

writeMethod · 0.95

Calls 1

AppendExemplarMethod · 0.65

Tested by

no test coverage detected