Skip to content

Commit bb9b2d4

Browse files
authored
[Fix-16929][Meter] Fix startup failed when metrics is disabled. (#17094)
1 parent 3e10cc4 commit bb9b2d4

11 files changed

Lines changed: 2 additions & 42 deletions

File tree

docs/docs/en/guide/metrics/metrics.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@ then access the `Grafana` by the url: `http://localhost:3001` for dashboards.
2727

2828
## Configuration
2929

30-
- Please add the following config in master/worker/alert/api's yaml file to enable the metrics exporter.
31-
32-
```yaml
33-
metrics:
34-
enabled: true
35-
```
36-
37-
- Once the metrics exporter enabled, you could access the metrics by the url `http://ip:port/actuator/prometheus`.
30+
You could access the metrics by the url `http://ip:port/actuator/prometheus`.
3831

3932
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`.
4033

docs/docs/zh/guide/metrics/metrics.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@ docker compose up
2727

2828
## 配置
2929

30-
- 请按照如下配置在您的 master/worker/alert/api's yaml 文件里启用metrics exporter:
31-
32-
```yaml
33-
metrics:
34-
enabled: true
35-
```
36-
37-
- 当您启用metrics exporter后,您可通过链接`http://ip:port/actuator/prometheus`获取metrics。
30+
您可通过链接`http://ip:port/actuator/prometheus`获取metrics。
3831

3932
metrics exporter端口`server.port`是在application.yaml里定义的: master: `server.port: 5679`, worker: `server.port: 1235`, alert: `server.port: 50053`, api: `server.port: 12345`.
4033

dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ registry:
9090
block-until-connected: 15s
9191
digest: ~
9292

93-
metrics:
94-
enabled: true
95-
9693
# Override by profile
9794

9895
---

dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ registry:
9090
block-until-connected: 600ms
9191
digest: ~
9292

93-
metrics:
94-
enabled: true
95-
9693
# Override by profile
9794

9895
---

dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/ldap-login/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ management:
290290
tags:
291291
application: ${spring.application.name}
292292

293-
metrics:
294-
enabled: true
295-
296293
# Override by profile
297294
---
298295
spring:

dolphinscheduler-api/src/main/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ api:
165165
# (0 = infinite), and socket server would never close even though no requests accept
166166
read-timeout: 0
167167

168-
metrics:
169-
enabled: true
170-
171168
security:
172169
authentication:
173170
# Authentication types (supported types: PASSWORD,LDAP,CASDOOR_SSO)

dolphinscheduler-master/src/main/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ management:
139139
tags:
140140
application: ${spring.application.name}
141141

142-
metrics:
143-
enabled: true
144-
145142
# Override by profile
146143

147144
---

dolphinscheduler-master/src/test/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,3 @@ management:
101101
metrics:
102102
tags:
103103
application: ${spring.application.name}
104-
105-
metrics:
106-
enabled: true

dolphinscheduler-meter/src/main/java/org/apache/dolphinscheduler/meter/MeterAutoConfiguration.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import org.apache.dolphinscheduler.meter.metrics.DefaultMetricsProvider;
2121

22-
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
2322
import org.springframework.context.annotation.Bean;
2423
import org.springframework.context.annotation.Configuration;
2524
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -42,7 +41,6 @@
4241
*/
4342
@Configuration(proxyBeanMethods = false)
4443
@EnableAspectJAutoProxy
45-
@ConditionalOnProperty(prefix = "metrics", name = "enabled", havingValue = "true")
4644
public class MeterAutoConfiguration {
4745

4846
@Bean

dolphinscheduler-standalone-server/src/main/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,6 @@ management:
296296
tags:
297297
application: ${spring.application.name}
298298

299-
metrics:
300-
enabled: true
301-
302299
# Override by profile
303300
---
304301
spring:

0 commit comments

Comments
 (0)