MCPcopy Create free account
hub / github.com/cortexproject/cortex / Error

Method Error

pkg/util/spanlogger/spanlogger.go:97–104  ·  view source on GitHub ↗

Error sets error flag and logs the error on the span, if non-nil. Returns the err passed in.

(err error)

Source from the content-addressed store, hash-verified

95
96// Error sets error flag and logs the error on the span, if non-nil. Returns the err passed in.
97func (s *SpanLogger) Error(err error) error {
98 if err == nil {
99 return nil
100 }
101 ext.Error.Set(s.Span, true)
102 s.LogFields(otlog.Error(err))
103 return err
104}

Calls 2

LogFieldsMethod · 0.80
SetMethod · 0.65