ctubbsii commented on code in PR #5398: URL: https://github.com/apache/accumulo/pull/5398#discussion_r2045808461
########## core/src/main/java/org/apache/accumulo/core/trace/TraceUtil.java: ########## @@ -191,22 +194,13 @@ public static <T> Callable<T> unwrap(Callable<T> c) { public static <T> T wrapService(final T instance) { InvocationHandler handler = (obj, method, args) -> { - if (args == null || args.length < 1 || args[0] == null || !(args[0] instanceof TInfo)) { - try { - return method.invoke(instance, args); - } catch (InvocationTargetException e) { - throw e.getCause(); - } - } - Span span = startServerRpcSpan(instance.getClass(), method.getName(), (TInfo) args[0]); - try (Scope scope = span.makeCurrent()) { + Span span = Span.current(); // should be set by protocol + try { Review Comment: I think I may have misunderstood what you were doing before. I think you might have had it correct before. I didn't realize you were creating the server span in the protocol, prior to this invocation handler being called. The expectation, I think, was that the invocation handler just needed to get a reference to the span started by the protocol, for the purposes of attaching any exceptions to it. I think I will need to look at this more closely, but I am now thinking I misled you by my earlier comment, and you were doing it correctly before. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org