You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2023/02/24 05:01:48 UTC

[skywalking-java] branch spring6 updated (7c25c39ee8 -> b93d054a20)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch spring6
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git


 discard 7c25c39ee8 Try to fix Spring 6 test case
     new b93d054a20 Try to fix Spring 6 test case

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (7c25c39ee8)
            \
             N -- N -- N   refs/heads/spring6 (b93d054a20)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../spring/resttemplate/sync/define/RestTemplateInstrumentation.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[skywalking-java] 01/01: Try to fix Spring 6 test case

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch spring6
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git

commit b93d054a20dd98d2ae047ab4c04d3e79e59f64f6
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Feb 24 13:01:40 2023 +0800

    Try to fix Spring 6 test case
---
 .github/workflows/plugins-jdk17-test.1.yaml                          | 3 +++
 .../spring/resttemplate/sync/define/RestTemplateInstrumentation.java | 2 +-
 .../resttemplate/v6x/sync/define/RestTemplateInstrumentation.java    | 5 ++++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/plugins-jdk17-test.1.yaml b/.github/workflows/plugins-jdk17-test.1.yaml
index d820466d8c..6a671c312b 100644
--- a/.github/workflows/plugins-jdk17-test.1.yaml
+++ b/.github/workflows/plugins-jdk17-test.1.yaml
@@ -17,6 +17,9 @@
 name: Test
 
 on:
+  push:
+    branches:
+      - spring6
   pull_request:
     paths:
       - '.github/workflows/plugins-*.yaml'
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/define/RestTemplateInstrumentation.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/define/RestTemplateInstrumentation.java
index 9c98b81c50..65133bac65 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/define/RestTemplateInstrumentation.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/define/RestTemplateInstrumentation.java
@@ -115,7 +115,7 @@ public class RestTemplateInstrumentation extends ClassInstanceMethodsEnhancePlug
     @Override
     protected String[] witnessClasses() {
         return new String[] {
-            "org.springframework.web.context.support.ServletContextAttributeFactoryBean"
+            "org.springframework.http.client.reactive.JdkClientHttpConnector"
         };
     }
 }
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/resttemplate-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/v6x/sync/define/RestTemplateInstrumentation.java b/apm-sniffer/optional-plugins/optional-spring-plugins/resttemplate-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/v6x/sync/define/RestTemplateInstrumentation.java
index c9fdb3823d..3a29870e49 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/resttemplate-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/v6x/sync/define/RestTemplateInstrumentation.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/resttemplate-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/v6x/sync/define/RestTemplateInstrumentation.java
@@ -26,6 +26,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterc
 import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
 
 import static net.bytebuddy.matcher.ElementMatchers.named;
+import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
 import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
 
 /**
@@ -59,7 +60,9 @@ public class RestTemplateInstrumentation extends ClassInstanceMethodsEnhancePlug
             new InstanceMethodsInterceptPoint() {
                 @Override
                 public ElementMatcher<MethodDescription> getMethodsMatcher() {
-                    return named(DO_EXECUTE_METHOD_NAME);
+                    return named(DO_EXECUTE_METHOD_NAME)
+                            .and(takesArgument(0, named("java.net.URI")))
+                            .and(takesArgument(2, named("org.springframework.http.HttpMethod")));
                 }
 
                 @Override