birschick-bq commented on code in PR #4655:
URL: https://github.com/apache/arrow-adbc/pull/4655#discussion_r3761502856
##########
go/adbc/driver/internal/shared_utils.go:
##########
@@ -781,12 +783,52 @@ func EndSpan(span trace.Span, err error, options
...trace.SpanEndOption) {
func EndSpanWithError(span trace.Span, err *error, options
...trace.SpanEndOption) {
if err != nil && *err != nil {
span.RecordError(*err)
- if adbcError, ok := (*err).(adbc.Error); ok {
+ setSpanStatus(span, *err)
+ } else {
+ setSpanStatus(span, nil)
+ }
+ span.End(options...)
+}
+
+// EndSpanWithRecordedError ends a span whose error event has already been
+// recorded by the caller, setting only the final status and error type.
+func EndSpanWithRecordedError(span trace.Span, err *error, options
...trace.SpanEndOption) {
+ if err != nil {
Review Comment:
Resolved in refactored code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]