[Doc] update ReadMe doc in metric module#17388
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the metrics module README to modernize and simplify documentation around module structure, reporters, configuration, and extension points.
Changes:
- Refreshes the introduction and supported reporter list.
- Removes the old “Test Report” section and replaces it with a streamlined “How to use” section with a small config table.
- Updates guidance for integrating/implementing custom metric frameworks and links to user docs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 1. Now, MetricService is registered as IService in server and confignode module, you can simple set properties: `dn(cn)_enable_metric=true` to use metric service. | ||
| 2. In server module you can easily use these metric by `MetricService.getInstance()`, for example: | ||
| ## 2.2. Use Guide in IoTDB Server Module | ||
| 1. `MetricService` is registered as an `IService` in both DataNode and ConfigNode modules. Enable it with `dn(cn)_enable_metric=true`. |
There was a problem hiding this comment.
dn(cn)_enable_metric is documented as the switch to enable MetricService, but the server starts and registers MetricService unconditionally (e.g., DataNode/ConfigNode setUpMetricService()), and there’s no corresponding config key in MetricConfigDescriptor/iotdb-system.properties.template. Please update this section to reflect the real way to disable metrics (e.g., set dn/cn_metric_level=OFF and/or leave *_metric_reporter_list empty) or document the actual controlling config if it exists elsewhere.
| 1. `MetricService` is registered as an `IService` in both DataNode and ConfigNode modules. Enable it with `dn(cn)_enable_metric=true`. | |
| 1. `MetricService` is registered as an `IService` in both DataNode and ConfigNode modules and is started unconditionally. To effectively disable metrics output, set `dn(cn)_metric_level=OFF` and/or leave `dn(cn)_metric_reporter_list` empty. |
| | properties | meaning | example | | ||
| | --- | --- | --- | | ||
| | `dn(cn)_metric_reporter_list` | Reporter list. The current implementation supports `JMX`, `PROMETHEUS` and `IOTDB`. | `JMX,PROMETHEUS` | | ||
| | `dn(cn)_metric_level` | Initial metric level. | `OFF`, `CORE`, `IMPORTANT`, `NORMAL`, `ALL` | |
There was a problem hiding this comment.
In the configuration table, the example column for dn(cn)_metric_level lists all possible values rather than an example value. Consider moving the allowed values into the meaning column (or an Options: note) and using a single representative example (e.g., IMPORTANT).
| | `dn(cn)_metric_level` | Initial metric level. | `OFF`, `CORE`, `IMPORTANT`, `NORMAL`, `ALL` | | |
| | `dn(cn)_metric_level` | Initial metric level. Options: `OFF`, `CORE`, `IMPORTANT`, `NORMAL`, `ALL`. | `IMPORTANT` | |
| 7. tags are taken out of the tag pool. | ||
| 8. searchNumber:The number of queries, the default is 1000000. | ||
| 9. loop:The number of query loops, the default is 10. | ||
| More details, see the User Guide and the `iotdb-system.properties.template` file. |
There was a problem hiding this comment.
This README says the reporter list supports IOTDB and then points readers to iotdb-system.properties.template for more details, but the current template only documents [JMX, PROMETHEUS] and doesn’t list the IoTDB reporter config keys. Either adjust the wording here (so it’s clear the template is incomplete/outdated) or update the template in a follow-up to avoid confusing users.
| More details, see the User Guide and the `iotdb-system.properties.template` file. | |
| For more details, see the User Guide. Note that the `iotdb-system.properties.template` file currently documents configuration for JMX and Prometheus reporters; IoTDB reporter configuration keys may not yet be listed there. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #17388 +/- ##
============================================
+ Coverage 39.48% 39.78% +0.29%
- Complexity 282 312 +30
============================================
Files 5097 5127 +30
Lines 341170 346355 +5185
Branches 43452 44113 +661
============================================
+ Hits 134725 137782 +3057
- Misses 206445 208573 +2128 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Update ReadMe doc in metric module.