|
@@ -1,5 +1,6 @@
|
|
package cn.iocoder.dashboard.common.annotation;
|
|
package cn.iocoder.dashboard.common.annotation;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
import cn.iocoder.dashboard.util.sping.SpElUtil;
|
|
import cn.iocoder.dashboard.util.sping.SpElUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.skywalking.apm.toolkit.trace.ActiveSpan;
|
|
import org.apache.skywalking.apm.toolkit.trace.ActiveSpan;
|
|
@@ -22,8 +23,12 @@ public class BizTracingAop {
|
|
public void tagBizInfo(ProceedingJoinPoint joinPoint, BizTracing bizTracing) {
|
|
public void tagBizInfo(ProceedingJoinPoint joinPoint, BizTracing bizTracing) {
|
|
String bizId = SpElUtil.analysisSpEl(bizTracing.bizId(), joinPoint);
|
|
String bizId = SpElUtil.analysisSpEl(bizTracing.bizId(), joinPoint);
|
|
String bizType = SpElUtil.analysisSpEl(bizTracing.bizType(), joinPoint);
|
|
String bizType = SpElUtil.analysisSpEl(bizTracing.bizType(), joinPoint);
|
|
|
|
+ if (StrUtil.isBlankIfStr(bizId)) {
|
|
|
|
+ log.error("empty biz: bizId[{}], bizType[{}].", bizId, bizType);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
log.info("accept biz: bizId[{}], bizType[{}].", bizId, bizType);
|
|
log.info("accept biz: bizId[{}], bizType[{}].", bizId, bizType);
|
|
- ActiveSpan.tag(BizTracing.BIZ_ID, bizId);
|
|
|
|
- ActiveSpan.tag(BizTracing.BIZ_TYPE, bizType);
|
|
|
|
|
|
+ ActiveSpan.tag(BizTracing.BIZ_ID_TAG, bizId);
|
|
|
|
+ ActiveSpan.tag(BizTracing.BIZ_TYPE_TAG, bizType);
|
|
}
|
|
}
|
|
}
|
|
}
|