From cc0534f998c1777fdd445eb24d1e5bb0a05737e0 Mon Sep 17 00:00:00 2001 From: wdullaer Date: Thu, 22 Sep 2022 13:59:36 +0200 Subject: [PATCH] Update trace/trace.go Co-authored-by: Damien Mathieu <42@dmathieu.com> --- trace/trace.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trace/trace.go b/trace/trace.go index 4ff03e86d52..1b5ffb00a1f 100644 --- a/trace/trace.go +++ b/trace/trace.go @@ -364,8 +364,9 @@ type Span interface { SpanContext() SpanContext // SetStatus sets the status of the Span in the form of a code and a - // description. The description is only included in a status when the code - // is for an error. + // description, provided the status hasn't already been set to a higher + // value before (OK > Error > Unset). The description is only included in a + // status when the code is for an error. SetStatus(code codes.Code, description string) // SetName sets the Span name.