MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / RecordError

Function RecordError

pkg/otelx/otelx.go:117–122  ·  view source on GitHub ↗

RecordError records an error on the span and sets its status to Error.

(span trace.Span, err error)

Source from the content-addressed store, hash-verified

115
116// RecordError records an error on the span and sets its status to Error.
117func RecordError(span trace.Span, err error) {
118 if err != nil {
119 span.RecordError(err)
120 span.SetStatus(codes.Error, err.Error())
121 }
122}

Callers 3

UpdateMethod · 0.92
TestRecordErrorFunction · 0.85

Calls 2

ErrorMethod · 0.65
SetStatusMethod · 0.45

Tested by 1

TestRecordErrorFunction · 0.68