Check returns true when err is nil. Otherwise, it adds err as an exception event on s and returns false. If you intend to return err, consider using [Escape] instead. See: https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans
(s Span, err error)
| 15 | // |
| 16 | // See: https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans |
| 17 | func Check(s Span, err error) bool { |
| 18 | if err == nil { |
| 19 | return true |
| 20 | } |
| 21 | if s.IsRecording() { |
| 22 | s.RecordError(err) |
| 23 | } |
| 24 | return false |
| 25 | } |
| 26 | |
| 27 | // Escape adds non-nil err as an escaped exception event on s and returns err. |
| 28 | // See: https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans |
no outgoing calls