mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-24 07:55:06 +08:00
项目结构调整 x 21 : 解决 opentracing 版本的冲突问题
This commit is contained in:
@ -340,7 +340,7 @@ public class OperateLogAspect {
|
||||
// 递归,处理数组、Collection、Map 的情况
|
||||
if (Collection.class.isAssignableFrom(clazz)) {
|
||||
return ((Collection<?>) object).stream()
|
||||
.anyMatch((Predicate<Object>) o -> isIgnoreArgs(object));
|
||||
.anyMatch((Predicate<Object>) OperateLogAspect::isIgnoreArgs);
|
||||
}
|
||||
if (Map.class.isAssignableFrom(clazz)) {
|
||||
return isIgnoreArgs(((Map<?, ?>) object).values());
|
||||
|
@ -53,6 +53,10 @@
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-toolkit-opentracing</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.opentracing</groupId>
|
||||
<artifactId>opentracing-util</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
|
@ -33,7 +33,7 @@ public class YudaoTracerAutoConfiguration {
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public BizTraceAspect bizTracingAop() {
|
||||
return new BizTraceAspect();
|
||||
return new BizTraceAspect(tracer());
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.tracer.core.annotation.BizTrace;
|
||||
import cn.iocoder.yudao.framework.common.util.sping.SpringExpressionUtils;
|
||||
import io.opentracing.Span;
|
||||
import io.opentracing.Tracer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@ -22,19 +23,19 @@ import static java.util.Arrays.asList;
|
||||
* @author mashu
|
||||
*/
|
||||
@Aspect
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class BizTraceAspect {
|
||||
|
||||
private static final String BIZ_OPERATION_NAME_PREFIX = "Biz/";
|
||||
|
||||
@Resource
|
||||
private Tracer tracer;
|
||||
private final Tracer tracer;
|
||||
|
||||
@Around(value = "@annotation(trace)")
|
||||
public Object around(ProceedingJoinPoint joinPoint, BizTrace trace) throws Throwable {
|
||||
// 创建 span
|
||||
String operationName = getOperationName(joinPoint, trace);
|
||||
Span span = tracer.buildSpan(operationName).startManual();
|
||||
Span span = tracer.buildSpan(operationName).start();
|
||||
try {
|
||||
// 执行原有方法
|
||||
return joinPoint.proceed();
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.framework.mq.config;
|
||||
import cn.hutool.system.SystemUtil;
|
||||
import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener;
|
||||
import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessageListener;
|
||||
import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
@ -26,7 +27,7 @@ import java.util.List;
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Configuration
|
||||
@AutoConfigureAfter(YudaoMQAutoConfiguration.class)
|
||||
@AutoConfigureAfter(YudaoRedisAutoConfiguration.class)
|
||||
@Slf4j
|
||||
public class YudaoMQAutoConfiguration {
|
||||
|
||||
|
Reference in New Issue
Block a user