MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / Check

Function Check

internal/tracing/errors.go:17–25  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

15//
16// See: https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans
17func 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

Callers 2

KubernetesClusterDomainFunction · 0.92
TestCheckFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCheckFunction · 0.68