-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚡ opt unuse label #13034
⚡ opt unuse label #13034
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we only add commitId
and hostname
tag only in dubbo_application_info_total
...o-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/model/MetricsSupport.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## 3.2 #13034 +/- ##
============================================
+ Coverage 67.90% 69.40% +1.49%
+ Complexity 20 2 -18
============================================
Files 1858 1649 -209
Lines 88840 68580 -20260
Branches 14288 10002 -4286
============================================
- Hits 60331 47599 -12732
+ Misses 23154 16398 -6756
+ Partials 5355 4583 -772 see 3507 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
public static Map<String, String> applicationTags(ApplicationModel applicationModel) { | ||
return applicationTags(applicationModel, null); | ||
} | ||
|
||
public static Map<String, String> applicationTags(ApplicationModel applicationModel, @Nullable Map<String, String> extraInfo) { | ||
Map<String, String> tags = new HashMap<>(); | ||
tags.put(TAG_IP, getLocalHost()); | ||
tags.put(TAG_HOSTNAME, getLocalHostName()); | ||
tags.put(TAG_APPLICATION_NAME, applicationModel.getApplicationName()); | ||
tags.put(TAG_APPLICATION_MODULE, applicationModel.getInternalId()); | ||
tags.put(TAG_APPLICATION_VERSION_KEY, version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version
key can be moved into gitTags
Kudos, SonarCloud Quality Gate passed! |
return tags; | ||
} | ||
public static Map<String, String> hostTags( Map<String, String> tags) { | ||
tags.put(TAG_IP, getLocalHost()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
服务方法的指标数据,ip标签为何移走了?是怎么考量的?
某个方法耗时长,怎么反推定位到是某个ip实例触发的?通过traceId定位么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ip可以直接查指标来源的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
明白了,感谢!👍🏻
What is the purpose of the change
remove unuse label : host、ip、gitcommitid
we can get it(host) when discover host such as prometheus use $instance
Brief changelog
Verifying this change
Checklist