wxbty opened a new pull request, #11522: URL: https://github.com/apache/dubbo/pull/11522
Since different developers implement the collection and processing of indicators in different scenarios, I think it is necessary to provide a unified API to handle the same parts, such as buried points, MerticsKey and other scenarios. This can also simplify the code review of the specific implementation part. 1. The initMetricsReporter of DefaultApplicationDeployerd obtains the collector through spi, and then registers with BeanFactory, and dynamically obtains the collector when exporting data. In this way, the default package does not need to rely on third-party collection packages, and users can customize collectors. 2. Add the MetricsCollector at the Application level to distinguish the method level. 3. Buried in the form of publishing events, adding a life cycle method for events, and describing the 3 fixed steps of the start, end, and exception of the buried stage. 4. TimeCounter integrates event and provides reusable event rt processing. 5. MetricsKeyWrapper can dynamically describe MetricsKey and reduce repetitive code of MetricsKey. 6. The data aggregation objects of each scene need to export the GaugeMetricSample format data in the end, and define the MetricsExport interface to describe the behavior of the same object. 中文: 由于不同的开发人员实现不同场景的指标收集处理,我认为有必要提供统一的api处理相同部分,比如埋点、MerticsKey等场景。这样也可以简化具体实现部分的代码review。 1、DefaultApplicationDeployerd的initMetricsReporter通过spi获取collector,再注册到BeanFactory,导出数据时动态获取collector。这样default包不需要依赖三方收集包,同时用户可以自定义collector。 2、增加Application级别的MetricsCollector,以区分method级别。 3、发布事件的形式进行埋点,为事件增加生命周期方法,描述埋点阶段开始、结束及异常3个固定步骤。 4、TimeCounter 集成event,提供可复用的事件rt处理。 5、MetricsKeyWrapper可以动态的描述MetricsKey,减少MetricsKey重复代码。 6、各场景的数据聚合对象,最终都需要导出GaugeMetricSample格式数据,定义MetricsExport接口描述同一对象的行为。 -- 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]
