MCPcopy Index your code
hub / github.com/cortexproject/cortex / recordError

Method recordError

pkg/ring/batch.go:43–52  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

41}
42
43func (i *itemTracker) recordError(err error) int32 {
44
45 if status, ok := status.FromError(err); ok && status.Code()/100 == 4 {
46 i.err4xx.Store(err)
47 return i.failed4xx.Inc()
48 }
49
50 i.err5xx.Store(err)
51 return i.failed5xx.Inc()
52}
53
54func (i *itemTracker) getError() error {
55 if i.failed5xx.Load() > i.failed4xx.Load() {

Callers 1

recordMethod · 0.80

Calls 2

StoreMethod · 0.65
IncMethod · 0.45

Tested by

no test coverage detected