This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new bb9b2d47c2 [Fix-16929][Meter] Fix startup failed when metrics is 
disabled. (#17094)
bb9b2d47c2 is described below

commit bb9b2d47c20a6c7a4481bbdc1f09817c05ff6745
Author: ZHANG YINGHONG <[email protected]>
AuthorDate: Thu Apr 10 10:03:42 2025 +0800

    [Fix-16929][Meter] Fix startup failed when metrics is disabled. (#17094)
---
 docs/docs/en/guide/metrics/metrics.md                            | 9 +--------
 docs/docs/zh/guide/metrics/metrics.md                            | 9 +--------
 .../src/main/resources/application.yaml                          | 3 ---
 .../src/test/resources/application.yaml                          | 3 ---
 .../src/test/resources/docker/ldap-login/application.yaml        | 3 ---
 dolphinscheduler-api/src/main/resources/application.yaml         | 3 ---
 dolphinscheduler-master/src/main/resources/application.yaml      | 3 ---
 dolphinscheduler-master/src/test/resources/application.yaml      | 3 ---
 .../apache/dolphinscheduler/meter/MeterAutoConfiguration.java    | 2 --
 .../src/main/resources/application.yaml                          | 3 ---
 dolphinscheduler-worker/src/main/resources/application.yaml      | 3 ---
 11 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/docs/docs/en/guide/metrics/metrics.md 
b/docs/docs/en/guide/metrics/metrics.md
index 9ba7cc73e7..180d64991a 100644
--- a/docs/docs/en/guide/metrics/metrics.md
+++ b/docs/docs/en/guide/metrics/metrics.md
@@ -27,14 +27,7 @@ then access the `Grafana` by the url: 
`http://localhost:3001` for dashboards.
 
 ## Configuration
 
-- Please add the following config in master/worker/alert/api's yaml file to 
enable the metrics exporter.
-
-```yaml
-metrics:
-  enabled: true
-```
-
-- Once the metrics exporter enabled, you could access the metrics by the url 
`http://ip:port/actuator/prometheus`.
+You could access the metrics by the url `http://ip:port/actuator/prometheus`.
 
 The exporter port is the `server.port` defined in application.yaml, e.g: 
master: `server.port: 5679`, worker: `server.port: 1235`, alert: `server.port: 
50053`, api: `server.port: 12345`.
 
diff --git a/docs/docs/zh/guide/metrics/metrics.md 
b/docs/docs/zh/guide/metrics/metrics.md
index 4865a14222..26d910a678 100644
--- a/docs/docs/zh/guide/metrics/metrics.md
+++ b/docs/docs/zh/guide/metrics/metrics.md
@@ -27,14 +27,7 @@ docker compose up
 
 ## 配置
 
-- 请按照如下配置在您的 master/worker/alert/api's yaml 文件里启用metrics exporter:
-
-```yaml
-metrics:
-  enabled: true
-```
-
-- 当您启用metrics exporter后,您可通过链接`http://ip:port/actuator/prometheus`获取metrics。
+您可通过链接`http://ip:port/actuator/prometheus`获取metrics。
 
 metrics exporter端口`server.port`是在application.yaml里定义的: master: `server.port: 
5679`, worker: `server.port: 1235`, alert: `server.port: 50053`, api: 
`server.port: 12345`.
 
diff --git 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml
 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml
index 927cbc3c2c..40545cf83c 100644
--- 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml
+++ 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml
@@ -90,9 +90,6 @@ registry:
     block-until-connected: 15s
     digest: ~
 
-metrics:
-  enabled: true
-
 # Override by profile
 
 ---
diff --git 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/resources/application.yaml
 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/resources/application.yaml
index d16d05a678..26f0890221 100644
--- 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/resources/application.yaml
+++ 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/resources/application.yaml
@@ -90,9 +90,6 @@ registry:
     block-until-connected: 600ms
     digest: ~
 
-metrics:
-  enabled: true
-
 # Override by profile
 
 ---
diff --git 
a/dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/ldap-login/application.yaml
 
b/dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/ldap-login/application.yaml
index 4ee2e9ac15..eac2b63592 100644
--- 
a/dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/ldap-login/application.yaml
+++ 
b/dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/ldap-login/application.yaml
@@ -290,9 +290,6 @@ management:
     tags:
       application: ${spring.application.name}
 
-metrics:
-  enabled: true
-
 # Override by profile
 ---
 spring:
diff --git a/dolphinscheduler-api/src/main/resources/application.yaml 
b/dolphinscheduler-api/src/main/resources/application.yaml
index 4578aa08ac..2762563c42 100644
--- a/dolphinscheduler-api/src/main/resources/application.yaml
+++ b/dolphinscheduler-api/src/main/resources/application.yaml
@@ -165,9 +165,6 @@ api:
     # (0 = infinite), and socket server would never close even though no 
requests accept
     read-timeout: 0
 
-metrics:
-  enabled: true
-
 security:
   authentication:
     # Authentication types (supported types: PASSWORD,LDAP,CASDOOR_SSO)
diff --git a/dolphinscheduler-master/src/main/resources/application.yaml 
b/dolphinscheduler-master/src/main/resources/application.yaml
index e003a9ee09..09c5949d70 100644
--- a/dolphinscheduler-master/src/main/resources/application.yaml
+++ b/dolphinscheduler-master/src/main/resources/application.yaml
@@ -139,9 +139,6 @@ management:
     tags:
       application: ${spring.application.name}
 
-metrics:
-  enabled: true
-
 # Override by profile
 
 ---
diff --git a/dolphinscheduler-master/src/test/resources/application.yaml 
b/dolphinscheduler-master/src/test/resources/application.yaml
index ddbe80cf4c..f9cb331abf 100644
--- a/dolphinscheduler-master/src/test/resources/application.yaml
+++ b/dolphinscheduler-master/src/test/resources/application.yaml
@@ -101,6 +101,3 @@ management:
   metrics:
     tags:
       application: ${spring.application.name}
-
-metrics:
-  enabled: true
diff --git 
a/dolphinscheduler-meter/src/main/java/org/apache/dolphinscheduler/meter/MeterAutoConfiguration.java
 
b/dolphinscheduler-meter/src/main/java/org/apache/dolphinscheduler/meter/MeterAutoConfiguration.java
index 67c8ee62a2..85ead741dc 100644
--- 
a/dolphinscheduler-meter/src/main/java/org/apache/dolphinscheduler/meter/MeterAutoConfiguration.java
+++ 
b/dolphinscheduler-meter/src/main/java/org/apache/dolphinscheduler/meter/MeterAutoConfiguration.java
@@ -19,7 +19,6 @@ package org.apache.dolphinscheduler.meter;
 
 import org.apache.dolphinscheduler.meter.metrics.DefaultMetricsProvider;
 
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -42,7 +41,6 @@ import io.micrometer.core.instrument.MeterRegistry;
  */
 @Configuration(proxyBeanMethods = false)
 @EnableAspectJAutoProxy
-@ConditionalOnProperty(prefix = "metrics", name = "enabled", havingValue = 
"true")
 public class MeterAutoConfiguration {
 
     @Bean
diff --git 
a/dolphinscheduler-standalone-server/src/main/resources/application.yaml 
b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
index 577bed72da..0346bb3037 100644
--- a/dolphinscheduler-standalone-server/src/main/resources/application.yaml
+++ b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
@@ -296,9 +296,6 @@ management:
     tags:
       application: ${spring.application.name}
 
-metrics:
-  enabled: true
-
 # Override by profile
 ---
 spring:
diff --git a/dolphinscheduler-worker/src/main/resources/application.yaml 
b/dolphinscheduler-worker/src/main/resources/application.yaml
index cb3b9c514f..8c85f1f5eb 100644
--- a/dolphinscheduler-worker/src/main/resources/application.yaml
+++ b/dolphinscheduler-worker/src/main/resources/application.yaml
@@ -89,6 +89,3 @@ management:
   metrics:
     tags:
       application: ${spring.application.name}
-
-metrics:
-  enabled: true

Reply via email to