|
|
@ -21,10 +21,10 @@ |
|
|
|
package org.apache.dolphinscheduler.meter; |
|
|
|
package org.apache.dolphinscheduler.meter; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
|
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.context.annotation.EnableAspectJAutoProxy; |
|
|
|
import org.springframework.context.annotation.EnableAspectJAutoProxy; |
|
|
|
import org.springframework.context.annotation.Profile; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import io.micrometer.core.aop.CountedAspect; |
|
|
|
import io.micrometer.core.aop.CountedAspect; |
|
|
|
import io.micrometer.core.aop.TimedAspect; |
|
|
|
import io.micrometer.core.aop.TimedAspect; |
|
|
@ -33,6 +33,7 @@ import io.micrometer.core.instrument.MeterRegistry; |
|
|
|
@Configuration |
|
|
|
@Configuration |
|
|
|
@EnableAspectJAutoProxy |
|
|
|
@EnableAspectJAutoProxy |
|
|
|
@EnableAutoConfiguration |
|
|
|
@EnableAutoConfiguration |
|
|
|
|
|
|
|
@ConditionalOnProperty(prefix = "metrics", name = "enabled", havingValue = "true") |
|
|
|
public class MeterConfiguration { |
|
|
|
public class MeterConfiguration { |
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
public TimedAspect timedAspect(MeterRegistry registry) { |
|
|
|
public TimedAspect timedAspect(MeterRegistry registry) { |
|
|
|