iotdb
iotdb copied to clipboard
[IOTDB-4096] Optimize metric module and Fix inconsistency between dropwizard and micrometer.
Optimize Metric Module:
- rename
MetricService
toAbstractMetricService
and renameMetricsService
toMetricService
to avoid ambiguity. - Abstract same logical into
AbstractMetricManager
, simply the implementation ofDropwizardMetricManager
andMicrometerMetricManager
, add the check of the verify metric name and tags(prohibit metric have same name and different tag keys) - Add the control of IMetricSets in
AbstractMetricService
and simply the use of interface from metric manager and metric reporter. - Clear and modify the comment in metric module.
- Update the doc of metric module.
- Add more UTs to ensure the correctness of metric module.
Fix inconsistency between dropwizard and micrometer:
- remove
DropwizardMetricName
andMicrometerMetricName
, introduceMetricInfo
to hold name, tags and type. - fix dropwizard prometheus reporter: some metrics(counter, timer and reter)'s name exported to prometheus are different from micrometer.
Fix other minor problems:
- fix the remove of different monitor type metric.
- fix some other minor problems.
See: https://issues.apache.org/jira/browse/IOTDB-4096