iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

[IOTDB-4096] Optimize metric module and Fix inconsistency between dropwizard and micrometer.

Open SpriCoder opened this issue 2 years ago • 0 comments

Optimize Metric Module:

  1. rename MetricService to AbstractMetricService and rename MetricsService to MetricService to avoid ambiguity.
  2. Abstract same logical into AbstractMetricManager, simply the implementation of DropwizardMetricManager and MicrometerMetricManager, add the check of the verify metric name and tags(prohibit metric have same name and different tag keys)
  3. Add the control of IMetricSets in AbstractMetricService and simply the use of interface from metric manager and metric reporter.
  4. Clear and modify the comment in metric module.
  5. Update the doc of metric module.
  6. Add more UTs to ensure the correctness of metric module.

Fix inconsistency between dropwizard and micrometer:

  1. remove DropwizardMetricName and MicrometerMetricName, introduce MetricInfo to hold name, tags and type.
  2. fix dropwizard prometheus reporter: some metrics(counter, timer and reter)'s name exported to prometheus are different from micrometer.

Fix other minor problems:

  1. fix the remove of different monitor type metric.
  2. fix some other minor problems.

See: https://issues.apache.org/jira/browse/IOTDB-4096

SpriCoder avatar Aug 10 '22 12:08 SpriCoder