-
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
[Task] Refector Metric export #14015
Comments
@songxiaosheng Can you provide more information? tks. In spring boot, where should I refer to? this? |
such as this otel PR : https://github.com/apache/dubbo/pull/14067/files |
spring boot is implemented with the @autoConfiguration annotation. does dubbo have an auto-injection mechanism for this? |
MetricsExport is used to obtain metric information, while MetricsReporter is similar to Register in micrometer. First of all, which part of the current Issue is aimed at optimizing? And then, I have some optimization suggestions for MetricsExport and MetricsCollector, such as:
|
My suggestions will be implemented in #14016. |
Hello everyone, Through reading the source code of Spring Boot, I've observed that configuring monitoring exports seems to only require setting up XXXXMeterRegistry, such as InfluxMeterRegistry or OtlpMeterRegistry. In contrast, with Dubbo, our current initialization process involves setting up the complete AbstractMetricsReporter, which includes many complex implementations like addJvmMetrics, initCollectors, and even operations like registerDubboShutdownHook. I believe this approach is not quite reasonable. Instead, we should use composition over inheritance to clarify developers' tasks and implementation goals. This also aligns with the principle of least knowledge in design patterns. We should differentiate the management of metric collection/exposure and metric service lifecycle. Additionally, we need to consider how to integrate and merge the monitoring of both Spring Boot Actuator and Dubbo in the same application. It's worth noting that this may not require specific attention within Dubbo, as we should differentiate between Dubbo and Dubbo-SpringBoot. |
I don't think implementing Spring Boot's implementation approach is a good idea; 1、Most components are integrated into Spring Boot, and autoconfiguration is a feature of Spring Boot. Therefore, component integration needs to meet the basic requirements of Spring Boot's automatic configuration and out-of-the-box usability, which relies on autoconfiguration to achieve. |
The implementation of the indicator export part is not abstract enough and cannot be flexibly adapted to other scenarios. You can refer to the implementation of springboot.
The text was updated successfully, but these errors were encountered: