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

   <!-- 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.
   
   ## Ask your question here
   
   应用从`3.2.5`升级到`3.2.7`版本,发现方法维度的标签指标,没有ip字段?请问是怎么考量的?
   `3.2.6`版本没有重构`org.apache.dubbo.metrics.model.MetricsSupport#applicationTags)`
   
   看了`3.2.7`版本发布说明的3个功能变更,没搜索到关于`MetricsSupport`或`hostTags`的改动
   
   <img width="650" alt="image" 
src="https://github.com/apache/dubbo/assets/1811851/3bb35547-c20e-421b-94e0-52753bf6d395";>
   
   ### 标签指标数据前后对比
   
   ```
   # HELP dubbo_provider_requests_failed_service_unavailable_total_aggregate 
Aggregated failed codec total Requests
   # TYPE dubbo_provider_requests_failed_service_unavailable_total_aggregate 
gauge
   dubbo_provider_requests_failed_service_unavailable_total_aggregate{
   application_module_id="1.1",application_name="lefit-user",
   application_version="3.2.6",
   git_commit_id="89e279739b02f79dcb0a9d40462feb12fd237908",group="",
   
hostname="lihuagangdebijibendiannao.local",interface="com.lefit.user.client.core.UserLoginApi",
   ip="172.16.22.50",method="userLoginInWXMiniProgram",version="1.0",} 0.0
   ```
   
   `3.2.7`版本的标签指标
   ```
   # HELP dubbo_provider_requests_failed_service_unavailable_total_aggregate 
Aggregated failed codec total Requests
   # TYPE dubbo_provider_requests_failed_service_unavailable_total_aggregate 
gauge
   dubbo_provider_requests_failed_service_unavailable_total_aggregate{
   application="lefit-user",application_module_id="1.1",
   application_name="lefit-user",
   
group="",interface="com.lefit.user.client.core.UserApi",method="userDefaultGenInfo",version="1.0",}
 0.0
   ```
   
   通过`arthas`抓包验证`org.apache.dubbo.metrics.model.MethodMetric.getTags`
   
   
![img_v3_0052_8ad14dfc-b57c-4d7f-a997-253aa052fadg](https://github.com/apache/dubbo/assets/1811851/73742ac2-7589-4999-aafb-39bc958d4af3)
   
   
   
   `org.apache.dubbo.metrics.model.Metric`
   ```java
   
   public interface Metric {
       Map<String, String> getTags();
   }
   
   ```
   
   ### 服务方法维度的标签指标
   `org.apache.dubbo.metrics.model.MethodMetric#getTags`
   
   
![e5f2ad18-62de-42e2-a19c-75cae2230cea](https://github.com/apache/dubbo/assets/1811851/d65dc7ee-9d4d-4d2c-84a8-313db3d0df60)
   
   `org.apache.dubbo.metrics.model.MetricsSupport#methodTags`
   
   
![e07b37db-d1be-47e9-bb96-61fe3437b38a](https://github.com/apache/dubbo/assets/1811851/ae379aad-0ddf-4a2b-9527-3b706364c397)
   
   `org.apache.dubbo.metrics.model.MetricsSupport#hostTags`
   这个方法没有被调用,所以IP没有了
   
   
![73cdec92-a34a-4b73-89a2-10922b70e2ef](https://github.com/apache/dubbo/assets/1811851/cefea4f4-64ff-4bf6-a81a-54c06a03a0c3)
   
   ### 应用维度的标签指标
   `org.apache.dubbo.metrics.model.ApplicationMetric#getTags`
   
   
![img_v3_0252_4b4dcaff-9cf5-47f1-b1cb-737e2a7f217g](https://github.com/apache/dubbo/assets/1811851/05c5ce12-c74a-4089-93ff-65ab25e7475b)
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to