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 2021/09/13 06:15:36 UTC
[GitHub] [dubbo] kevinw66 opened a new pull request #8785: [3.0] Refactor MetricsConfig and add empty Prometheus implementation.
kevinw66 opened a new pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785
## What is the purpose of the change
1.Refactor MetricsConfig
2.Add empty prometheus implementation
3.Add dubbo-metrics module
4.Support nested class configuration resolver
--
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 edited a comment on pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#issuecomment-922772645
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?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 [#8785](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (453ecbf) into [3.0](https://codecov.io/gh/apache/dubbo/commit/acd49fefbcceaff5a9831f4c7059f4b55de610da?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (acd49fe) will **increase** coverage by `0.03%`.
> The diff coverage is `77.83%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8785/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8785 +/- ##
============================================
+ Coverage 63.75% 63.78% +0.03%
+ Complexity 315 314 -1
============================================
Files 1169 1171 +2
Lines 49226 49377 +151
Branches 7361 7394 +33
============================================
+ Hits 31384 31497 +113
- Misses 14418 14433 +15
- Partials 3424 3447 +23
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...apache/dubbo/common/constants/CommonConstants.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uc3RhbnRzL0NvbW1vbkNvbnN0YW50cy5qYXZh) | `100.00% <ø> (ø)` | |
| [...java/org/apache/dubbo/common/utils/FieldUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRmllbGRVdGlscy5qYXZh) | `80.55% <ø> (-0.53%)` | :arrow_down: |
| [.../dubbo/monitor/support/MetricsServiceDetector.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tbW9uaXRvci9kdWJiby1tb25pdG9yLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vbW9uaXRvci9zdXBwb3J0L01ldHJpY3NTZXJ2aWNlRGV0ZWN0b3IuamF2YQ==) | `100.00% <ø> (ø)` | |
| [.../org/apache/dubbo/monitor/dubbo/MetricsFilter.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tbW9uaXRvci9kdWJiby1tb25pdG9yLWRlZmF1bHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL21vbml0b3IvZHViYm8vTWV0cmljc0ZpbHRlci5qYXZh) | `66.05% <ø> (ø)` | |
| [...ot/autoconfigure/DubboConfigurationProperties.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tc3ByaW5nLWJvb3QvZHViYm8tc3ByaW5nLWJvb3QtY29tcGF0aWJsZS9hdXRvY29uZmlndXJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9zcHJpbmcvYm9vdC9hdXRvY29uZmlndXJlL0R1YmJvQ29uZmlndXJhdGlvblByb3BlcnRpZXMuamF2YQ==) | `47.57% <25.00%> (-1.91%)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RJbnRlcmZhY2VDb25maWcuamF2YQ==) | `83.06% <33.33%> (+1.12%)` | :arrow_up: |
| [...ava/org/apache/dubbo/common/utils/MethodUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvTWV0aG9kVXRpbHMuamF2YQ==) | `57.01% <53.33%> (-0.56%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/config/AbstractConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RDb25maWcuamF2YQ==) | `79.44% <74.24%> (-0.85%)` | :arrow_down: |
| [...onfig/spring/schema/DubboBeanDefinitionParser.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvc2NoZW1hL0R1YmJvQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `79.53% <77.50%> (-0.31%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/MetricsConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0cmljc0NvbmZpZy5qYXZh) | `78.94% <85.71%> (-21.06%)` | :arrow_down: |
| ... and [23 more](https://codecov.io/gh/apache/dubbo/pull/8785/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [acd49fe...453ecbf](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] codecov-commenter edited a comment on pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#issuecomment-922772645
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?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 [#8785](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5717db1) into [3.0](https://codecov.io/gh/apache/dubbo/commit/acd49fefbcceaff5a9831f4c7059f4b55de610da?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (acd49fe) will **increase** coverage by `0.01%`.
> The diff coverage is `78.75%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8785/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8785 +/- ##
============================================
+ Coverage 63.75% 63.77% +0.01%
+ Complexity 315 302 -13
============================================
Files 1169 1169
Lines 49226 49265 +39
Branches 7361 7381 +20
============================================
+ Hits 31384 31418 +34
+ Misses 14418 14417 -1
- Partials 3424 3430 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...apache/dubbo/common/constants/CommonConstants.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uc3RhbnRzL0NvbW1vbkNvbnN0YW50cy5qYXZh) | `100.00% <ø> (ø)` | |
| [...java/org/apache/dubbo/common/utils/FieldUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRmllbGRVdGlscy5qYXZh) | `80.55% <ø> (-0.53%)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RJbnRlcmZhY2VDb25maWcuamF2YQ==) | `84.05% <ø> (+2.11%)` | :arrow_up: |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `81.97% <ø> (-0.08%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/ServiceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9TZXJ2aWNlQ29uZmlnLmphdmE=) | `73.58% <ø> (-0.08%)` | :arrow_down: |
| [...ot/autoconfigure/DubboConfigurationProperties.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tc3ByaW5nLWJvb3QvZHViYm8tc3ByaW5nLWJvb3QtY29tcGF0aWJsZS9hdXRvY29uZmlndXJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9zcHJpbmcvYm9vdC9hdXRvY29uZmlndXJlL0R1YmJvQ29uZmlndXJhdGlvblByb3BlcnRpZXMuamF2YQ==) | `47.57% <25.00%> (-1.91%)` | :arrow_down: |
| [...ava/org/apache/dubbo/common/utils/MethodUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvTWV0aG9kVXRpbHMuamF2YQ==) | `57.01% <53.33%> (-0.56%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/config/AbstractConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RDb25maWcuamF2YQ==) | `79.44% <74.24%> (-0.85%)` | :arrow_down: |
| [...onfig/spring/schema/DubboBeanDefinitionParser.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvc2NoZW1hL0R1YmJvQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `79.53% <77.50%> (-0.31%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/MetricsConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0cmljc0NvbmZpZy5qYXZh) | `87.50% <83.33%> (-12.50%)` | :arrow_down: |
| ... and [18 more](https://codecov.io/gh/apache/dubbo/pull/8785/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [acd49fe...5717db1](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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 change in pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on a change in pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#discussion_r714560912
##########
File path: dubbo-common/src/main/java/org/apache/dubbo/common/utils/MethodUtils.java
##########
@@ -395,4 +396,35 @@ static Method findOverriddenMethod(Method overrider, Class<?> declaringClass) {
List<Method> matchedMethods = getAllMethods(declaringClass, method -> overrides(overrider, method));
return matchedMethods.isEmpty() ? null : matchedMethods.get(0);
}
+
+ /**
+ * Extract fieldName from set/get/is method. if it's not a set/get/is method, return empty string.
+ * If method equals get/is/getClass/getObject, also return empty string.
+ *
+ * @param method method
+ * @return fieldName
+ */
+ static String extractFieldName(Method method) {
Review comment:
Missing unit test, same below.
##########
File path: dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
##########
@@ -126,6 +126,7 @@ public void tesModuleConfig() {
@Test
public void tesMetricsConfig() {
MetricsConfig config = new MetricsConfig();
+ config.setProtocol("prometheus");
Review comment:
Replace with `PROTOCOL_PROMETHEUS`.
Same below.
--
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] kylixs merged pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
kylixs merged pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785
--
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] kevinw66 commented on a change in pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
kevinw66 commented on a change in pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#discussion_r710780098
##########
File path: dubbo-config/dubbo-config-spring/src/test/resources/org/apache/dubbo/config/spring/metrics-prometheus.xml
##########
@@ -0,0 +1,34 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
+ xmlns="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
+ http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd
+ ">
+
+ <!-- current application configuration -->
+ <dubbo:application name="demo-consumer" />
+
+ <dubbo:metrics protocol="prometheus">
Review comment:
removed
--
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] kevinw66 commented on a change in pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
kevinw66 commented on a change in pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#discussion_r714595618
##########
File path: dubbo-common/src/main/java/org/apache/dubbo/common/utils/MethodUtils.java
##########
@@ -395,4 +396,35 @@ static Method findOverriddenMethod(Method overrider, Class<?> declaringClass) {
List<Method> matchedMethods = getAllMethods(declaringClass, method -> overrides(overrider, method));
return matchedMethods.isEmpty() ? null : matchedMethods.get(0);
}
+
+ /**
+ * Extract fieldName from set/get/is method. if it's not a set/get/is method, return empty string.
+ * If method equals get/is/getClass/getObject, also return empty string.
+ *
+ * @param method method
+ * @return fieldName
+ */
+ static String extractFieldName(Method method) {
Review comment:
done
##########
File path: dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
##########
@@ -126,6 +126,7 @@ public void tesModuleConfig() {
@Test
public void tesMetricsConfig() {
MetricsConfig config = new MetricsConfig();
+ config.setProtocol("prometheus");
Review comment:
done
--
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] kylixs commented on a change in pull request #8785: [3.0] Refactor MetricsConfig and add empty Prometheus implementation.
Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#discussion_r709992142
##########
File path: dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/MetricsFactory.java
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.metrics;
+
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.extension.Adaptive;
+import org.apache.dubbo.common.extension.ExtensionScope;
+import org.apache.dubbo.common.extension.SPI;
+
+/**
+ * MetricsFactory. (SPI, Singleton, ThreadSafe)
+ */
+@SPI(value = "prometheus", scope = ExtensionScope.APPLICATION)
+public interface MetricsFactory {
+
+ /**
+ * Create metrics.
+ *
+ * @param url
+ * @return metrics
+ */
+ @Adaptive("protocol")
+ Metrics getMetrics(URL url);
Review comment:
MetricsProvider also seems inappropriate. What capabilities can Prometheus' SPI provide? Think about this interface
--
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] kylixs commented on a change in pull request #8785: [3.0] Refactor MetricsConfig and add empty Prometheus implementation.
Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#discussion_r709981120
##########
File path: dubbo-config/dubbo-config-spring/src/test/resources/org/apache/dubbo/config/spring/metrics-prometheus.xml
##########
@@ -0,0 +1,34 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
+ xmlns="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
+ http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd
+ ">
+
+ <!-- current application configuration -->
+ <dubbo:application name="demo-consumer" />
+
+ <dubbo:metrics protocol="prometheus">
Review comment:
Should we remove the `<dubbo:prometheus> ... <dubbo:prometheus/>` ?
```xml
<dubbo:metrics protocol="prometheus">
<dubbo:prometheus-exporter enabled="true" enable-http-service-discovery="true" http-service-discovery-url="localhost:8080" metrics-port="20888" metrics-path="/metrics" />
<dubbo:prometheus-pushgateway enabled="true" base-url="localhost:9091" push-interval="30" username="username" password="password" job="job" />
</dubbo:metrics>
```
##########
File path: dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/MetricsFactory.java
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.metrics;
+
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.extension.Adaptive;
+import org.apache.dubbo.common.extension.ExtensionScope;
+import org.apache.dubbo.common.extension.SPI;
+
+/**
+ * MetricsFactory. (SPI, Singleton, ThreadSafe)
+ */
+@SPI(value = "prometheus", scope = ExtensionScope.APPLICATION)
+public interface MetricsFactory {
+
+ /**
+ * Create metrics.
+ *
+ * @param url
+ * @return metrics
+ */
+ @Adaptive("protocol")
+ Metrics getMetrics(URL url);
Review comment:
The name of `Metrics` / `MetricsFactory` is not very appropriate, here is a suggestion: `MetricsProvider` / `MetricsProviderFactory`
##########
File path: dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/Metrics.java
##########
@@ -14,16 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.monitor.support;
+package org.apache.dubbo.metrics;
-import org.apache.dubbo.monitor.MetricsService;
-import org.apache.dubbo.rpc.model.BuiltinServiceDetector;
+import org.apache.dubbo.common.Node;
-public class MetricsServiceDetector implements BuiltinServiceDetector {
-
- @Override
- public Class<?> getService() {
- return MetricsService.class;
- }
+/**
+ * Monitor. (SPI, Prototype, ThreadSafe)
+ *
+ * @see org.apache.dubbo.metrics.MetricsFactory#getMetrics(org.apache.dubbo.common.URL)
+ */
+public interface Metrics extends Node, MetricsService {
Review comment:
`MetricsProvider` should not implement `MetricsService`. I think `MetricsService` is a service that provides metrics query, not implemented by metrics provider.
--
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] kevinw66 commented on a change in pull request #8785: [3.0] Refactor MetricsConfig and add empty Prometheus implementation.
Posted by GitBox <gi...@apache.org>.
kevinw66 commented on a change in pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#discussion_r710153204
##########
File path: dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/Metrics.java
##########
@@ -14,16 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.monitor.support;
+package org.apache.dubbo.metrics;
-import org.apache.dubbo.monitor.MetricsService;
-import org.apache.dubbo.rpc.model.BuiltinServiceDetector;
+import org.apache.dubbo.common.Node;
-public class MetricsServiceDetector implements BuiltinServiceDetector {
-
- @Override
- public Class<?> getService() {
- return MetricsService.class;
- }
+/**
+ * Monitor. (SPI, Prototype, ThreadSafe)
+ *
+ * @see org.apache.dubbo.metrics.MetricsFactory#getMetrics(org.apache.dubbo.common.URL)
+ */
+public interface Metrics extends Node, MetricsService {
Review comment:
deleted
--
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 edited a comment on pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#issuecomment-922772645
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?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 [#8785](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5717db1) into [3.0](https://codecov.io/gh/apache/dubbo/commit/acd49fefbcceaff5a9831f4c7059f4b55de610da?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (acd49fe) will **increase** coverage by `0.01%`.
> The diff coverage is `78.75%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8785/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8785 +/- ##
============================================
+ Coverage 63.75% 63.77% +0.01%
+ Complexity 315 302 -13
============================================
Files 1169 1169
Lines 49226 49265 +39
Branches 7361 7381 +20
============================================
+ Hits 31384 31417 +33
+ Misses 14418 14417 -1
- Partials 3424 3431 +7
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...apache/dubbo/common/constants/CommonConstants.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uc3RhbnRzL0NvbW1vbkNvbnN0YW50cy5qYXZh) | `100.00% <ø> (ø)` | |
| [...java/org/apache/dubbo/common/utils/FieldUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRmllbGRVdGlscy5qYXZh) | `80.55% <ø> (-0.53%)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RJbnRlcmZhY2VDb25maWcuamF2YQ==) | `84.05% <ø> (+2.11%)` | :arrow_up: |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `81.97% <ø> (-0.08%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/ServiceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9TZXJ2aWNlQ29uZmlnLmphdmE=) | `73.58% <ø> (-0.08%)` | :arrow_down: |
| [...ot/autoconfigure/DubboConfigurationProperties.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tc3ByaW5nLWJvb3QvZHViYm8tc3ByaW5nLWJvb3QtY29tcGF0aWJsZS9hdXRvY29uZmlndXJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9zcHJpbmcvYm9vdC9hdXRvY29uZmlndXJlL0R1YmJvQ29uZmlndXJhdGlvblByb3BlcnRpZXMuamF2YQ==) | `47.57% <25.00%> (-1.91%)` | :arrow_down: |
| [...ava/org/apache/dubbo/common/utils/MethodUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvTWV0aG9kVXRpbHMuamF2YQ==) | `57.01% <53.33%> (-0.56%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/config/AbstractConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RDb25maWcuamF2YQ==) | `79.44% <74.24%> (-0.85%)` | :arrow_down: |
| [...onfig/spring/schema/DubboBeanDefinitionParser.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvc2NoZW1hL0R1YmJvQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `79.53% <77.50%> (-0.31%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/MetricsConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0cmljc0NvbmZpZy5qYXZh) | `87.50% <83.33%> (-12.50%)` | :arrow_down: |
| ... and [18 more](https://codecov.io/gh/apache/dubbo/pull/8785/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [acd49fe...5717db1](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] codecov-commenter edited a comment on pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#issuecomment-922772645
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?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 [#8785](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5717db1) into [3.0](https://codecov.io/gh/apache/dubbo/commit/acd49fefbcceaff5a9831f4c7059f4b55de610da?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (acd49fe) will **decrease** coverage by `0.08%`.
> The diff coverage is `78.75%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8785/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8785 +/- ##
============================================
- Coverage 63.75% 63.66% -0.09%
+ Complexity 315 301 -14
============================================
Files 1169 1169
Lines 49226 49265 +39
Branches 7361 7381 +20
============================================
- Hits 31384 31366 -18
- Misses 14418 14460 +42
- Partials 3424 3439 +15
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...apache/dubbo/common/constants/CommonConstants.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uc3RhbnRzL0NvbW1vbkNvbnN0YW50cy5qYXZh) | `100.00% <ø> (ø)` | |
| [...java/org/apache/dubbo/common/utils/FieldUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRmllbGRVdGlscy5qYXZh) | `80.55% <ø> (-0.53%)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RJbnRlcmZhY2VDb25maWcuamF2YQ==) | `84.05% <ø> (+2.11%)` | :arrow_up: |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `81.97% <ø> (-0.08%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/ServiceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9TZXJ2aWNlQ29uZmlnLmphdmE=) | `73.58% <ø> (-0.08%)` | :arrow_down: |
| [...ot/autoconfigure/DubboConfigurationProperties.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tc3ByaW5nLWJvb3QvZHViYm8tc3ByaW5nLWJvb3QtY29tcGF0aWJsZS9hdXRvY29uZmlndXJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9zcHJpbmcvYm9vdC9hdXRvY29uZmlndXJlL0R1YmJvQ29uZmlndXJhdGlvblByb3BlcnRpZXMuamF2YQ==) | `47.57% <25.00%> (-1.91%)` | :arrow_down: |
| [...ava/org/apache/dubbo/common/utils/MethodUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvTWV0aG9kVXRpbHMuamF2YQ==) | `57.01% <53.33%> (-0.56%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/config/AbstractConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RDb25maWcuamF2YQ==) | `79.44% <74.24%> (-0.85%)` | :arrow_down: |
| [...onfig/spring/schema/DubboBeanDefinitionParser.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvc2NoZW1hL0R1YmJvQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `79.53% <77.50%> (-0.31%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/MetricsConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0cmljc0NvbmZpZy5qYXZh) | `87.50% <83.33%> (-12.50%)` | :arrow_down: |
| ... and [33 more](https://codecov.io/gh/apache/dubbo/pull/8785/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [acd49fe...5717db1](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] codecov-commenter commented on pull request #8785: [3.0] Refactor MetricsConfig
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#issuecomment-922772645
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?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 [#8785](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5717db1) into [3.0](https://codecov.io/gh/apache/dubbo/commit/acd49fefbcceaff5a9831f4c7059f4b55de610da?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (acd49fe) will **decrease** coverage by `0.19%`.
> The diff coverage is `78.75%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8785/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8785 +/- ##
============================================
- Coverage 63.75% 63.56% -0.20%
+ Complexity 315 300 -15
============================================
Files 1169 1169
Lines 49226 49265 +39
Branches 7361 7359 -2
============================================
- Hits 31384 31315 -69
- Misses 14418 14503 +85
- Partials 3424 3447 +23
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...apache/dubbo/common/constants/CommonConstants.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uc3RhbnRzL0NvbW1vbkNvbnN0YW50cy5qYXZh) | `100.00% <ø> (ø)` | |
| [...java/org/apache/dubbo/common/utils/FieldUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRmllbGRVdGlscy5qYXZh) | `80.55% <ø> (-0.53%)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RJbnRlcmZhY2VDb25maWcuamF2YQ==) | `84.05% <ø> (+2.11%)` | :arrow_up: |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `81.97% <ø> (-0.08%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/ServiceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9TZXJ2aWNlQ29uZmlnLmphdmE=) | `73.58% <ø> (-0.08%)` | :arrow_down: |
| [...ot/autoconfigure/DubboConfigurationProperties.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tc3ByaW5nLWJvb3QvZHViYm8tc3ByaW5nLWJvb3QtY29tcGF0aWJsZS9hdXRvY29uZmlndXJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9zcHJpbmcvYm9vdC9hdXRvY29uZmlndXJlL0R1YmJvQ29uZmlndXJhdGlvblByb3BlcnRpZXMuamF2YQ==) | `47.57% <25.00%> (-1.91%)` | :arrow_down: |
| [...ava/org/apache/dubbo/common/utils/MethodUtils.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvTWV0aG9kVXRpbHMuamF2YQ==) | `57.01% <53.33%> (-0.56%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/config/AbstractConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQWJzdHJhY3RDb25maWcuamF2YQ==) | `79.44% <74.24%> (-0.85%)` | :arrow_down: |
| [...onfig/spring/schema/DubboBeanDefinitionParser.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvc2NoZW1hL0R1YmJvQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `79.53% <77.50%> (-0.31%)` | :arrow_down: |
| [...in/java/org/apache/dubbo/config/MetricsConfig.java](https://codecov.io/gh/apache/dubbo/pull/8785/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0cmljc0NvbmZpZy5qYXZh) | `87.50% <83.33%> (-12.50%)` | :arrow_down: |
| ... and [50 more](https://codecov.io/gh/apache/dubbo/pull/8785/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [acd49fe...5717db1](https://codecov.io/gh/apache/dubbo/pull/8785?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] kevinw66 commented on a change in pull request #8785: [3.0] Refactor MetricsConfig and add empty Prometheus implementation.
Posted by GitBox <gi...@apache.org>.
kevinw66 commented on a change in pull request #8785:
URL: https://github.com/apache/dubbo/pull/8785#discussion_r710153917
##########
File path: dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/MetricsFactory.java
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.metrics;
+
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.extension.Adaptive;
+import org.apache.dubbo.common.extension.ExtensionScope;
+import org.apache.dubbo.common.extension.SPI;
+
+/**
+ * MetricsFactory. (SPI, Singleton, ThreadSafe)
+ */
+@SPI(value = "prometheus", scope = ExtensionScope.APPLICATION)
+public interface MetricsFactory {
+
+ /**
+ * Create metrics.
+ *
+ * @param url
+ * @return metrics
+ */
+ @Adaptive("protocol")
+ Metrics getMetrics(URL url);
Review comment:
Currently deleted. Wait for next pull request to complete the implementation
--
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