-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Add metrics option for use global registry #12238
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
Conversation
Codecov Report
@@ Coverage Diff @@
## 3.2 #12238 +/- ##
============================================
- Coverage 69.69% 69.37% -0.32%
+ Complexity 317 2 -315
============================================
Files 3430 1604 -1826
Lines 161233 66192 -95041
Branches 26990 9712 -17278
============================================
- Hits 112372 45923 -66449
+ Misses 39025 15828 -23197
+ Partials 9836 4441 -5395 see 1858 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
songxiaosheng
left a comment
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.
稍等 我看下dubbo指标同步springboot那里 用全局的时候 如果springboot端点中的指标也是全局的会不会有啥冲突
看springboot actuator源码,是new的一个,在CompositeMeterRegistryConfiguration类 |
|
可以,那现在一共有三个micrometer,spring,dubbo dubbo可以复用micrometer的 现在是定时任务同步dubbo数据到spring 如果有配置能复用spring的我们就可以把那个定时任务去掉了 |
...rics/dubbo-metrics-default/src/main/java/org/apache/dubbo/metrics/MetricsGlobalRegistry.java
Outdated
Show resolved
Hide resolved
|
It would be better to add scope model id to prometheus tag to prevent data conflict. |
Optimized by #12288 |
ok |
...rics/dubbo-metrics-default/src/main/java/org/apache/dubbo/metrics/MetricsGlobalRegistry.java
Show resolved
Hide resolved
|
Kudos, SonarCloud Quality Gate passed! |
songxiaosheng
left a comment
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.
LGTM









What is the purpose of the change
micrometer provides a default global CompositeMeterRegistry, generally, dubbo can use it directly. Considering the isolation of multiple applications, provide configuration options and use a separate Registry for dubbo
Brief changelog
Use CompositeMeterRegistry according to the following priority