mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-11-29 18:58:05 +08:00
Add a property to enable/disable metrics module (#8484)
This commit is contained in:
parent
c1592ff38e
commit
fa19006a18
@ -52,6 +52,9 @@ management:
|
||||
alert:
|
||||
port: 50052
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
# Override by profile
|
||||
|
||||
---
|
||||
|
@ -104,6 +104,9 @@ registry:
|
||||
audit:
|
||||
enabled: false
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
# Override by profile
|
||||
|
||||
---
|
||||
|
@ -121,6 +121,9 @@ management:
|
||||
tags:
|
||||
application: ${spring.application.name}
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
# Override by profile
|
||||
|
||||
---
|
||||
|
@ -21,10 +21,10 @@
|
||||
package org.apache.dolphinscheduler.meter;
|
||||
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
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;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
|
||||
import io.micrometer.core.aop.CountedAspect;
|
||||
import io.micrometer.core.aop.TimedAspect;
|
||||
@ -33,6 +33,7 @@ import io.micrometer.core.instrument.MeterRegistry;
|
||||
@Configuration
|
||||
@EnableAspectJAutoProxy
|
||||
@EnableAutoConfiguration
|
||||
@ConditionalOnProperty(prefix = "metrics", name = "enabled", havingValue = "true")
|
||||
public class MeterConfiguration {
|
||||
@Bean
|
||||
public TimedAspect timedAspect(MeterRegistry registry) {
|
||||
|
@ -67,6 +67,9 @@ management:
|
||||
tags:
|
||||
application: ${spring.application.name}
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
# Override by profile
|
||||
---
|
||||
spring:
|
||||
|
@ -180,6 +180,9 @@ management:
|
||||
audit:
|
||||
enabled: true
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
# Override by profile
|
||||
---
|
||||
spring:
|
||||
|
@ -83,3 +83,6 @@ management:
|
||||
metrics:
|
||||
tags:
|
||||
application: ${spring.application.name}
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
Loading…
Reference in New Issue
Block a user