About the project
Pepper Metrics is an open source tool I developed with my colleagues (github.com/zrbcool/pep…) , by collecting jedis mybatis/httpservlet/dubbo/motan performance statistics, and exposure to Prometheus and other mainstream temporal database compatible data, through grafana show the trend. Its plug-in architecture also makes it easy for users to extend and integrate other open source components. Please give us a STAR, and we welcome you to become developers to submit PR and improve the project together.
Architecture
At its core, the Pepper Metrics project is based on Tom Wilkie’s RED theory, which collects RED Metrics for each service (specifically, a call to a process, such as a database query), including:
- Rate (Generally referred to as QPS)
- Errors (number of Errors or error rate within a unit time window)
- Duration (request Duration is usually expressed in hundredths of PXX, for example P99=100ms means that 99% of requests take place in X milliseconds)
The Pepper Metrics project, which is based on its core ideas and methodology, has built a complete system of pluggable plug-ins that allow applications to be built on selected components such as RPC communication framework Dubbo, Motan, ORM object model relational mapping framework Mybatis, standard HTTP Servlet components, Redis operation library Jedis, etc.) select existing plug-in extensions directly with the above indicators:
- collect
- Print (designed based on standard format and timed to log based on SLF4J)
- Output (for a variety of databases, implemented as Prometheus by default and exporting metrics to Prometheus)
- Visualization (Dashboard based on Grafana with Prometheus as the default data source)
Concept
Architecture
Component Description
- The Profiler, the core part, is used to start periodic scheduling tasks and load all ScheduledRun extensions through ExtensionLoad to initiate scheduling on a specified period. At the same time, the Stats constructor profiler.builder is maintained internally
- Scheduler, a virtual concept, exists in the Profiler as a scheduled task
- ExtensionLoader, a very important component, loads plug-ins through the Java SPI mechanism so that various modules of the project can be flexibly pluggable, and it is also the cornerstone of the project architecture
- ScheduledRun, extension point: Pepper metrics core will schedule and pass all Stats. The implementation plug-in can use the performance data collected from Stats. The scheduled printer component has been implemented at present
- MeterRegistryFactory, extension point: Registry implementations based on different Micrometers abstract and mask differences between individual databases
- Pepper Metrics X, specific integration, our goal is to measure everything, currently plan to achieve: Jedis, Motan, Dubbo, Servlet, Mybatis and other most commonly used components
Write in the last
- Project WIKI github.com/zrbcool/pep…
- Quick Start github.com/zrbcool/pep…
- Quick DEMO(10 minutes to locally launch full emulation application + Grafana + Prometheus + built-in Dashboard) github.com/zrbcool/pep…
- Online DEMO pepper – metrics. Zrbcool. Top