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/23 09:31:10 UTC

[GitHub] [dubbo] twz007 opened a new issue, #11001: org.apache.dubbo.metrics.filter.MetricsCollectExecutor#init 获取methodName在异步的情况下会拿到$invokeAsync,而不是真实的方法

twz007 opened a new issue, #11001:
URL: https://github.com/apache/dubbo/issues/11001

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.1.1
   * Operating System version: win10
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. 提供者设置MetricsConfig,注册DefaultMetricsCollector,AggregateMetricsCollector,创建PrometheusMetricsReporter并初始化,声明SPI org.apache.dubbo.metrics.filter.MetricsFilter, 启动提供者。
   2. 网关侧泛化调用并开启异步
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   
   filter中指标收集方法名出入一致,目前入口处是正确的,但是onResponse方法,Invocation 参数变成了$invokeAsync
   
   ![screenshot-20221123-171640](https://user-images.githubusercontent.com/26647353/203510628-cfe2c467-ffc3-4994-bf3f-57f4017a03ee.png)
   ![screenshot-20221123-171827](https://user-images.githubusercontent.com/26647353/203510665-a0306d06-dd83-49aa-b9bd-5b7137396ab0.png)
   
   <!-- What do you expect from the above steps?-->
   
   是否可以将`MetricsCollectExecutor#init`方法中获取methodName修改成 `((Object[])((DecodeableRpcInvocation)invocation).arguments)[0] `的值?
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   以下是收集的指标详情样例:
   
   ```
   requests_processing{application_name="aaa",group="aaa",hostname="bbb",interface="org.apache.dubbo.metadata.MetadataService",ip="192.168.56.1",method="getMetadataInfo",version="1.0.0",} 0.0
   requests_processing{application_name="aaa",group="",hostname="bbb",interface="aaa.bbb.ccc",ip="192.168.56.1",method="queryList",version="1.0",} 6.0
   requests_processing{application_name="aaa",group="",hostname="bbb",interface="aaa.bbb.ccc",ip="192.168.56.1",method="$invokeAsync",version="1.0",} -6.0
   
   这个$invokeAsync指标-6.0,实际上应该要和上面的queryList指标加在一起的。
   ```
   
   If there is an exception, please attach the exception trace:
   
   ```
   Just put your stack trace here!
   ```
   


-- 
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.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 closed issue #11001: org.apache.dubbo.metrics.filter.MetricsCollectExecutor#init 获取methodName在异步的情况下会拿到$invokeAsync,而不是真实的方法

Posted by GitBox <gi...@apache.org>.
AlbumenJ closed issue #11001: org.apache.dubbo.metrics.filter.MetricsCollectExecutor#init 获取methodName在异步的情况下会拿到$invokeAsync,而不是真实的方法
URL: https://github.com/apache/dubbo/issues/11001


-- 
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 issue #11001: org.apache.dubbo.metrics.filter.MetricsCollectExecutor#init 获取methodName在异步的情况下会拿到$invokeAsync,而不是真实的方法

Posted by GitBox <gi...@apache.org>.
twz007 commented on issue #11001:
URL: https://github.com/apache/dubbo/issues/11001#issuecomment-1324860791

   > 
   
   ok, I will try to solve 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] CrazyHZM commented on issue #11001: org.apache.dubbo.metrics.filter.MetricsCollectExecutor#init 获取methodName在异步的情况下会拿到$invokeAsync,而不是真实的方法

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #11001:
URL: https://github.com/apache/dubbo/issues/11001#issuecomment-1324780712

   Need to determine if it's a generalized call and then take the real method name, are you willing to submit PR to fix 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 issue #11001: org.apache.dubbo.metrics.filter.MetricsCollectExecutor#init 获取methodName在异步的情况下会拿到$invokeAsync,而不是真实的方法

Posted by GitBox <gi...@apache.org>.
twz007 commented on issue #11001:
URL: https://github.com/apache/dubbo/issues/11001#issuecomment-1326072254

   > Need to determine if it's a generalized call and then take the real method name, are you willing to submit PR to fix it? @twz007
   
   @CrazyHZM I have created a pr #11012, please review 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