Skip to content

[Doc] update ReadMe doc in metric module#17388

Merged
SpriCoder merged 2 commits intomasterfrom
doc/metric-update-260320
Mar 29, 2026
Merged

[Doc] update ReadMe doc in metric module#17388
SpriCoder merged 2 commits intomasterfrom
doc/metric-update-260320

Conversation

@SpriCoder
Copy link
Copy Markdown
Contributor

Update ReadMe doc in metric module.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
| 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` |
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
| `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` |

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.78%. Comparing base (8488a64) to head (33794ae).
⚠️ Report is 122 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SpriCoder SpriCoder merged commit d19de74 into master Mar 29, 2026
33 of 34 checks passed
@SpriCoder SpriCoder deleted the doc/metric-update-260320 branch March 29, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants