You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/10/18 08:13:50 UTC

[GitHub] [skywalking-java] guillaume-alvarez commented on a diff in pull request #353: Closes #9800, wait for transaction end to close span.

guillaume-alvarez commented on code in PR #353:
URL: https://github.com/apache/skywalking-java/pull/353#discussion_r997871568


##########
apm-sniffer/apm-sdk-plugin/neo4j-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/neo4j/v4x/TransactionRunInterceptor.java:
##########
@@ -61,13 +61,15 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
     @Override
     public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
             Object ret) throws Throwable {
-        SessionRequiredInfo requiredInfo = (SessionRequiredInfo) objInst.getSkyWalkingDynamicField();
-        if (requiredInfo == null || requiredInfo.getSpan() == null) {
-            return ret;
-        }
+        return ((CompletionStage<?>) ret).thenApply(resultCursor -> {

Review Comment:
   Indeed I'm on Windows, I just checked it out on linux to see if it works more smoothly.



-- 
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-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org