From 56eebb276e69ac43ffd1a04c1736fe895bf3fc40 Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 23 Aug 2024 11:23:06 +0200 Subject: [PATCH] fix(otelx): always set error in End (#804) --- otelx/withspan.go | 1 + 1 file changed, 1 insertion(+) diff --git a/otelx/withspan.go b/otelx/withspan.go index c7da09a1..a4e06684 100644 --- a/otelx/withspan.go +++ b/otelx/withspan.go @@ -90,4 +90,5 @@ func setErrorTags(span trace.Span, err error) { span.SetAttributes(attribute.String("error.details."+k, fmt.Sprintf("%v", v))) } } + span.SetAttributes(attribute.String("error", err.Error())) }