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 2021/12/15 03:34:27 UTC

[GitHub] [skywalking-java] chanjarster opened a new pull request #84: Enhance `returnedObj` expression to support Array, List and Map

chanjarster opened a new pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84


   ### Enhance `returnedObj` expression to support Array, List and Map for apm-customize-enhance-plugin and `@Tag`
   
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [x] Update the documentation to include this new feature.
   - [x] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
   
   
   - [x] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes https://github.com/apache/skywalking/issues/8300
   - [x] Update the [`CHANGES` log](https://github.com/apache/skywalking-java/blob/main/CHANGES.md).
   


-- 
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



[GitHub] [skywalking-java] chanjarster commented on pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
chanjarster commented on pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#issuecomment-994303413


   > Could you enhance `@Tag` plugin test too?
   
   Added


-- 
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



[GitHub] [skywalking-java] chanjarster commented on a change in pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
chanjarster commented on a change in pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#discussion_r769252046



##########
File path: apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/test/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationTest.java
##########
@@ -296,17 +301,29 @@ public User testMethodWithTags(String username, Integer age) {
             return new User(username, age);
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),
+        })
         public List<User> testMethodWithReturnList(String username, Integer age) {
             return Arrays.asList(new User(username, age));
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),

Review comment:
       OK, which e2e test need to be updated?




-- 
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



[GitHub] [skywalking-java] wu-sheng commented on a change in pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#discussion_r769251389



##########
File path: apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/test/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationTest.java
##########
@@ -296,17 +301,29 @@ public User testMethodWithTags(String username, Integer age) {
             return new User(username, age);
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),
+        })
         public List<User> testMethodWithReturnList(String username, Integer age) {
             return Arrays.asList(new User(username, age));
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),

Review comment:
       I think there should require expected file update too.




-- 
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



[GitHub] [skywalking-java] wu-sheng commented on pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#issuecomment-994266103


   Could you enhance `@Tag` plugin test too?


-- 
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



[GitHub] [skywalking-java] chanjarster commented on a change in pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
chanjarster commented on a change in pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#discussion_r769252046



##########
File path: apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/test/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationTest.java
##########
@@ -296,17 +301,29 @@ public User testMethodWithTags(String username, Integer age) {
             return new User(username, age);
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),
+        })
         public List<User> testMethodWithReturnList(String username, Integer age) {
             return Arrays.asList(new User(username, age));
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),

Review comment:
       OK, which e2e test need to be updated?




-- 
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



[GitHub] [skywalking-java] chanjarster commented on a change in pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
chanjarster commented on a change in pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#discussion_r769249425



##########
File path: CHANGES.md
##########
@@ -17,6 +17,7 @@ Release Notes.
 * Add dubbo 3.x plugin.
 * Fix TracePathMatcher should match pattern "**" with paths end by "/"
 * Add support `returnedObj` expression for apm-customize-enhance-plugin
+* Enhance `returnedObj` expression to support Array, List and Map for apm-customize-enhance-plugin and `@Tag`

Review comment:
       CHANGES.md updated, and nothing need to be added to Customize-enhance-trace.md




-- 
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



[GitHub] [skywalking-java] chanjarster commented on a change in pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
chanjarster commented on a change in pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#discussion_r769257216



##########
File path: apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/test/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationTest.java
##########
@@ -296,17 +301,29 @@ public User testMethodWithTags(String username, Integer age) {
             return new User(username, age);
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),
+        })
         public List<User> testMethodWithReturnList(String username, Integer age) {
             return Arrays.asList(new User(username, age));
         }
 
-        @Tags({@Tag(key = "username", value = "arg[0]"), @Tag(key = "info", value = "returnedObj.0.info")})
+        @Tags({
+            @Tag(key = "username", value = "arg[0]"),
+            @Tag(key = "info", value = "returnedObj.0.info"),
+            @Tag(key = "info2", value = "returnedObj.[0].info"),

Review comment:
       e2e test updated




-- 
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



[GitHub] [skywalking-java] wu-sheng commented on a change in pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84#discussion_r769222864



##########
File path: CHANGES.md
##########
@@ -17,6 +17,7 @@ Release Notes.
 * Add dubbo 3.x plugin.
 * Fix TracePathMatcher should match pattern "**" with paths end by "/"
 * Add support `returnedObj` expression for apm-customize-enhance-plugin
+* Enhance `returnedObj` expression to support Array, List and Map for apm-customize-enhance-plugin and `@Tag`

Review comment:
       I think we don't need this. Because this is enhancement of an unreleased feature.
   But please make sure the doc is updated accordingly.




-- 
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



[GitHub] [skywalking-java] wu-sheng merged pull request #84: Enhance `returnedObj` expression to support Array, List and Map

Posted by GitBox <gi...@apache.org>.
wu-sheng merged pull request #84:
URL: https://github.com/apache/skywalking-java/pull/84


   


-- 
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