[IOTDB-2638][Metric] add features into metric module (#5147)
authorZhangHongYin <46039728+stormbroken@users.noreply.github.com>
Thu, 3 Mar 2022 05:15:58 +0000 (13:15 +0800)
committerGitHub <noreply@github.com>
Thu, 3 Mar 2022 05:15:58 +0000 (13:15 +0800)
commite8462e4f41c659123353f74443cc07ce4539b36a
tree5fa31f95e5662608c65c246e6f74db6788b589fb
parent9f9dc19503563f0fb5311e528924560a499838ea
[IOTDB-2638][Metric] add features into metric module (#5147)

一 添加metricLevel来增强metric的初始化功能,包括core, important, normal和all四个级别
二 修改了dropwizard的prometheus的使用方式,抛弃pushgateway的方式,和micrometer保持一致。
三 更新了相应的文档
58 files changed:
cluster/src/main/java/org/apache/iotdb/cluster/log/manage/PartitionedSnapshotLogManager.java
cluster/src/main/java/org/apache/iotdb/cluster/server/handlers/caller/ElectionHandler.java
cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/ClusterMonitor.java
docs/UserGuide/Maintenance-Tools/Metric-Tool.md
docs/zh/UserGuide/Maintenance-Tools/Metric-Tool.md
metrics/ReadMe.md
metrics/dropwizard-metrics/pom.xml
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/DropwizardMetricManager.java
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/MetricName.java
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/DropwizardJmxReporter.java
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/DropwizardMetricsExporter.java [moved from metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/prometheus/DropwizardMetricsExporter.java with 85% similarity]
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/DropwizardPrometheusReporter.java
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/MetricType.java [moved from metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/prometheus/MetricType.java with 94% similarity]
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/PrometheusTextWriter.java [moved from metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/prometheus/PrometheusTextWriter.java with 97% similarity]
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/prometheus/PrometheusReporter.java [deleted file]
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/prometheus/PrometheusSender.java [deleted file]
metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/prometheus/PushGateway.java [deleted file]
metrics/dropwizard-metrics/src/main/resources/META-INF/services/org.apache.iotdb.metrics.reporter.Reporter [moved from metrics/dropwizard-metrics/src/main/resources/META-INF/services/org.apache.iotdb.metrics.Reporter with 100% similarity]
metrics/dropwizard-metrics/src/test/java/org/apache/iotdb/metrics/dropwizard/DropwizardMetricManagerTest.java
metrics/interface/src/main/assembly/resources/conf/iotdb-metric.yml
metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricService.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfig.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfigDescriptor.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricManager.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/CompositeReporter.java [moved from metrics/interface/src/main/java/org/apache/iotdb/metrics/CompositeReporter.java with 98% similarity]
metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/Reporter.java [moved from metrics/interface/src/main/java/org/apache/iotdb/metrics/Reporter.java with 92% similarity]
metrics/interface/src/main/java/org/apache/iotdb/metrics/type/IMetric.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricLevel.java [moved from metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/MeterIdUtils.java with 67% similarity]
metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MonitorType.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/OutPutFormat.java [moved from metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/prometheus/TextFormat.java with 79% similarity]
metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/PredefinedMetric.java
metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/ReporterType.java
metrics/interface/src/test/java/org/apache/iotdb/metrics/config/MetricConfigTest.java
metrics/interface/src/test/resources/iotdb-metric.yml
metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/MetricName.java [new file with mode: 0644]
metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/MicrometerMetricManager.java
metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/reporter/MicrometerJmxReporter.java
metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/reporter/MicrometerPrometheusReporter.java
metrics/micrometer-metrics/src/main/resources/META-INF/services/org.apache.iotdb.metrics.reporter.Reporter [moved from metrics/micrometer-metrics/src/main/resources/META-INF/services/org.apache.iotdb.metrics.Reporter with 100% similarity]
metrics/micrometer-metrics/src/test/java/org/apache/iotdb/metrics/micrometer/MicrometerMetricManagerTest.java
server/src/main/java/org/apache/iotdb/db/engine/cache/ChunkCache.java
server/src/main/java/org/apache/iotdb/db/engine/cache/TimeSeriesMetadataCache.java
server/src/main/java/org/apache/iotdb/db/engine/compaction/CompactionTaskManager.java
server/src/main/java/org/apache/iotdb/db/engine/compaction/task/AbstractCompactionTask.java
server/src/main/java/org/apache/iotdb/db/engine/flush/FlushManager.java
server/src/main/java/org/apache/iotdb/db/engine/flush/MemTableFlushTask.java
server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessorInfo.java
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/VirtualStorageGroupProcessor.java
server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
server/src/main/java/org/apache/iotdb/db/metrics/dropwizard/reporter/DropwizardIoTDBReporter.java
server/src/main/java/org/apache/iotdb/db/metrics/micrometer/reporter/MicrometerIoTDBReporter.java
server/src/main/java/org/apache/iotdb/db/query/pool/RawQueryReadTaskPoolManager.java
server/src/main/java/org/apache/iotdb/db/service/metrics/MetricsService.java
server/src/main/java/org/apache/iotdb/db/service/thrift/ProcessorWithMetrics.java
server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
server/src/main/resources/META-INF/services/org.apache.iotdb.metrics.reporter.Reporter [moved from server/src/main/resources/META-INF/services/org.apache.iotdb.metrics.Reporter with 100% similarity]