You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/24 07:44:01 UTC

[GitHub] [dubbo] twz007 opened a new pull request, #11012: Fixed metrics collection getting wrong method name when generalize called

twz007 opened a new pull request, #11012:
URL: https://github.com/apache/dubbo/pull/11012

   
   ## What is the purpose of the change
   
   Related with #11001
   
   ## Brief changelog
   
   
   ## Verifying this change
   
   
   <!-- Follow this checklist to help us incorporate your contribution quickly and easily: -->
   
   ## Checklist
   - [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
   - [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
   - [ ] Add some description to [dubbo-website](https://github.com/apache/dubbo-website) project if you are requesting to add a feature.
   - [ ] GitHub Actions works fine on your own branch.
   - [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/dubbo/wiki/Software-donation-guide).
   


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] sonarcloud[bot] commented on pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#issuecomment-1326114240

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=11012)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL)
   
   [![85.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '85.7%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_coverage&view=list) [85.7% Coverage](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_duplicated_lines_density&view=list)
   
   


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] sonarcloud[bot] commented on pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#issuecomment-1326965563

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=11012)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL)
   
   [![85.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '85.7%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_coverage&view=list) [85.7% Coverage](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_duplicated_lines_density&view=list)
   
   


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] twz007 commented on a diff in pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
twz007 commented on code in PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#discussion_r1031977476


##########
dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/filter/MetricsCollectExecutor.java:
##########
@@ -88,6 +90,10 @@ private void endExecute(Supplier<Boolean> rtStat){
     private void init(Invocation invocation) {
         String serviceUniqueName = invocation.getTargetServiceUniqueName();
         String methodName = invocation.getMethodName();
+        if (invocation instanceof RpcInvocation &&
+            isGenericCall(((RpcInvocation) invocation).getParameterTypesDesc(), methodName)) {
+            methodName = (String) invocation.getArguments()[0];

Review Comment:
   When generalizing call, the number of parameters must be 3, but it is possible for the array to be out of bounds for some unknown reasons. I will add a check to avoid it.



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] twz007 commented on pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
twz007 commented on PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#issuecomment-1326950382

   @CrazyHZM I have merged 'apache:3.1' into my 3.1 branch, this workflow seems need a maintainer to approve re-running.


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] sonarcloud[bot] commented on pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#issuecomment-1327224946

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=11012)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=11012&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=11012&resolved=false&types=CODE_SMELL)
   
   [![76.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '76.9%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_coverage&view=list) [76.9% Coverage](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=11012&metric=new_duplicated_lines_density&view=list)
   
   


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ merged pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
AlbumenJ merged PR #11012:
URL: https://github.com/apache/dubbo/pull/11012


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] twz007 commented on a diff in pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
twz007 commented on code in PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#discussion_r1032005831


##########
dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/filter/MetricsCollectExecutor.java:
##########
@@ -88,6 +90,10 @@ private void endExecute(Supplier<Boolean> rtStat){
     private void init(Invocation invocation) {
         String serviceUniqueName = invocation.getTargetServiceUniqueName();
         String methodName = invocation.getMethodName();
+        if (invocation instanceof RpcInvocation &&
+            isGenericCall(((RpcInvocation) invocation).getParameterTypesDesc(), methodName)) {
+            methodName = (String) invocation.getArguments()[0];

Review Comment:
   @CrazyHZM I solved it, please check the following.



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] codecov-commenter commented on pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#issuecomment-1326118379

   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/11012?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#11012](https://codecov.io/gh/apache/dubbo/pull/11012?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7b74aec) into [3.1](https://codecov.io/gh/apache/dubbo/commit/5d9638dd5ec6357d9d1fd55f5bb085eacb063d2d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5d9638d) will **decrease** coverage by `0.00%`.
   > The diff coverage is `66.66%`.
   
   > :exclamation: Current head 7b74aec differs from pull request most recent head 55c01eb. Consider uploading reports for the commit 55c01eb to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##                3.1   #11012      +/-   ##
   ============================================
   - Coverage     64.61%   64.61%   -0.01%     
     Complexity       14       14              
   ============================================
     Files          1418     1418              
     Lines         58858    58861       +3     
     Branches       8637     8639       +2     
   ============================================
   + Hits          38030    38031       +1     
   - Misses        16800    16807       +7     
   + Partials       4028     4023       -5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/11012?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...e/dubbo/metrics/filter/MetricsCollectExecutor.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0cmljcy9kdWJiby1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vbWV0cmljcy9maWx0ZXIvTWV0cmljc0NvbGxlY3RFeGVjdXRvci5qYXZh) | `88.00% <66.66%> (-1.37%)` | :arrow_down: |
   | [...center/initializer/UnpackZookeeperInitializer.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LWNoZWNrL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby90ZXN0L2NoZWNrL3JlZ2lzdHJ5Y2VudGVyL2luaXRpYWxpemVyL1VucGFja1pvb2tlZXBlckluaXRpYWxpemVyLmphdmE=) | `42.55% <0.00%> (-34.05%)` | :arrow_down: |
   | [...center/initializer/ConfigZookeeperInitializer.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LWNoZWNrL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby90ZXN0L2NoZWNrL3JlZ2lzdHJ5Y2VudGVyL2luaXRpYWxpemVyL0NvbmZpZ1pvb2tlZXBlckluaXRpYWxpemVyLmphdmE=) | `70.14% <0.00%> (-11.95%)` | :arrow_down: |
   | [...pache/dubbo/remoting/transport/AbstractServer.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RTZXJ2ZXIuamF2YQ==) | `61.03% <0.00%> (-3.90%)` | :arrow_down: |
   | [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `70.17% <0.00%> (-3.51%)` | :arrow_down: |
   | [...try/client/metadata/MetadataServiceDelegation.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWV0YWRhdGEvTWV0YWRhdGFTZXJ2aWNlRGVsZWdhdGlvbi5qYXZh) | `38.04% <0.00%> (-3.27%)` | :arrow_down: |
   | [...c/main/java/org/apache/dubbo/rpc/RpcException.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9ScGNFeGNlcHRpb24uamF2YQ==) | `80.64% <0.00%> (-3.23%)` | :arrow_down: |
   | [...va/org/apache/dubbo/registry/RegistryNotifier.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9SZWdpc3RyeU5vdGlmaWVyLmphdmE=) | `76.92% <0.00%> (-2.57%)` | :arrow_down: |
   | [.../registry/zookeeper/ZookeeperServiceDiscovery.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktem9va2VlcGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS96b29rZWVwZXIvWm9va2VlcGVyU2VydmljZURpc2NvdmVyeS5qYXZh) | `64.55% <0.00%> (-1.27%)` | :arrow_down: |
   | [.../dubbo/remoting/transport/netty4/NettyChannel.java](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2hhbm5lbC5qYXZh) | `73.58% <0.00%> (-0.95%)` | :arrow_down: |
   | ... and [15 more](https://codecov.io/gh/apache/dubbo/pull/11012/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] CrazyHZM commented on a diff in pull request #11012: Fixed metrics collection getting wrong method name when generalize called

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on code in PR #11012:
URL: https://github.com/apache/dubbo/pull/11012#discussion_r1031952663


##########
dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/filter/MetricsCollectExecutor.java:
##########
@@ -88,6 +90,10 @@ private void endExecute(Supplier<Boolean> rtStat){
     private void init(Invocation invocation) {
         String serviceUniqueName = invocation.getTargetServiceUniqueName();
         String methodName = invocation.getMethodName();
+        if (invocation instanceof RpcInvocation &&
+            isGenericCall(((RpcInvocation) invocation).getParameterTypesDesc(), methodName)) {
+            methodName = (String) invocation.getArguments()[0];

Review Comment:
   Check the length of the Arguments array to prevent out-of-bounds index addresses.



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org