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())) }