zeroshade commented on code in PR #2729: URL: https://github.com/apache/arrow-adbc/pull/2729#discussion_r2073846755
########## go/adbc/driver/internal/driverbase/connection.go: ########## @@ -222,7 +234,44 @@ func (base *ConnectionImplBase) ReadPartition(ctx context.Context, serializedPar return nil, base.ErrorHelper.Errorf(adbc.StatusNotImplemented, "ReadPartition") } +func maybeAddTraceParent(ctx context.Context, cnxn adbc.OTelTracing, st adbc.OTelTracing) (context.Context, error) { + var traceParentStr = "" + if st != nil && st.GetTraceParent() != "" { + traceParentStr = st.GetTraceParent() + } else if cnxn != nil && cnxn.GetTraceParent() != "" { + traceParentStr = cnxn.GetTraceParent() + } + if traceParentStr != "" { + spanContext, err := propogateTraceParent(ctx, traceParentStr) + if err != nil { + return ctx, err + } + ctx = trace.ContextWithRemoteSpanContext(ctx, spanContext) + } + return ctx, nil +} + +func propogateTraceParent(ctx context.Context, traceParentStr string) (trace.SpanContext, error) { Review Comment: `propagate` :) -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org