优化日志全链路追踪增加spanId和parentId
This commit is contained in:
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.central.log.config;
|
package com.central.log;
|
||||||
|
|
||||||
import com.central.log.properties.AuditLogProperties;
|
import com.central.log.properties.AuditLogProperties;
|
||||||
import com.central.log.properties.LogDbProperties;
|
import com.central.log.properties.LogDbProperties;
|
||||||
@@ -6,6 +6,7 @@ import com.central.log.properties.TraceProperties;
|
|||||||
import com.zaxxer.hikari.HikariConfig;
|
import com.zaxxer.hikari.HikariConfig;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,6 +15,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
* @author zlt
|
* @author zlt
|
||||||
* @date 2019/8/13
|
* @date 2019/8/13
|
||||||
*/
|
*/
|
||||||
|
@ComponentScan
|
||||||
@EnableConfigurationProperties({TraceProperties.class, AuditLogProperties.class})
|
@EnableConfigurationProperties({TraceProperties.class, AuditLogProperties.class})
|
||||||
public class LogAutoConfigure {
|
public class LogAutoConfigure {
|
||||||
/**
|
/**
|
||||||
+2
@@ -16,6 +16,7 @@ import org.springframework.expression.EvaluationContext;
|
|||||||
import org.springframework.expression.Expression;
|
import org.springframework.expression.Expression;
|
||||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
@@ -33,6 +34,7 @@ import java.time.LocalDateTime;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Aspect
|
@Aspect
|
||||||
|
@Component
|
||||||
@ConditionalOnClass({HttpServletRequest.class, RequestContextHolder.class})
|
@ConditionalOnClass({HttpServletRequest.class, RequestContextHolder.class})
|
||||||
public class AuditLogAspect {
|
public class AuditLogAspect {
|
||||||
@Value("${spring.application.name}")
|
@Value("${spring.application.name}")
|
||||||
|
|||||||
+2
@@ -12,6 +12,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
@@ -26,6 +27,7 @@ import javax.sql.DataSource;
|
|||||||
* Github: https://github.com/zlt2000
|
* Github: https://github.com/zlt2000
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Service
|
||||||
@ConditionalOnProperty(name = "zlt.audit-log.log-type", havingValue = "db")
|
@ConditionalOnProperty(name = "zlt.audit-log.log-type", havingValue = "db")
|
||||||
@ConditionalOnClass(JdbcTemplate.class)
|
@ConditionalOnClass(JdbcTemplate.class)
|
||||||
public class DbAuditServiceImpl implements IAuditService {
|
public class DbAuditServiceImpl implements IAuditService {
|
||||||
|
|||||||
+2
@@ -4,6 +4,7 @@ import com.central.log.model.Audit;
|
|||||||
import com.central.log.service.IAuditService;
|
import com.central.log.service.IAuditService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ import java.time.format.DateTimeFormatter;
|
|||||||
* Github: https://github.com/zlt2000
|
* Github: https://github.com/zlt2000
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Service
|
||||||
@ConditionalOnProperty(name = "zlt.audit-log.log-type", havingValue = "logger", matchIfMissing = true)
|
@ConditionalOnProperty(name = "zlt.audit-log.log-type", havingValue = "logger", matchIfMissing = true)
|
||||||
public class LoggerAuditServiceImpl implements IAuditService {
|
public class LoggerAuditServiceImpl implements IAuditService {
|
||||||
private static final String MSG_PATTERN = "{}|{}|{}|{}|{}|{}|{}|{}";
|
private static final String MSG_PATTERN = "{}|{}|{}|{}|{}|{}|{}|{}";
|
||||||
|
|||||||
+9
-6
@@ -1,9 +1,9 @@
|
|||||||
package com.central.log.trace;
|
package com.central.log.trace;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import org.apache.dubbo.common.constants.CommonConstants;
|
import org.apache.dubbo.common.constants.CommonConstants;
|
||||||
import org.apache.dubbo.common.extension.Activate;
|
import org.apache.dubbo.common.extension.Activate;
|
||||||
import org.apache.dubbo.rpc.*;
|
import org.apache.dubbo.rpc.*;
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dubbo过滤器,传递traceId
|
* dubbo过滤器,传递traceId
|
||||||
@@ -25,22 +25,25 @@ public class DubboTraceFilter implements Filter {
|
|||||||
boolean isProviderSide = RpcContext.getContext().isProviderSide();
|
boolean isProviderSide = RpcContext.getContext().isProviderSide();
|
||||||
if (isProviderSide) { //服务提供者逻辑
|
if (isProviderSide) { //服务提供者逻辑
|
||||||
String traceId = invocation.getAttachment(MDCTraceUtils.KEY_TRACE_ID);
|
String traceId = invocation.getAttachment(MDCTraceUtils.KEY_TRACE_ID);
|
||||||
if (StringUtils.isEmpty(traceId)) {
|
String spanId = invocation.getAttachment(MDCTraceUtils.KEY_SPAN_ID);
|
||||||
MDCTraceUtils.addTraceId();
|
if (StrUtil.isEmpty(traceId)) {
|
||||||
|
MDCTraceUtils.addTrace();
|
||||||
} else {
|
} else {
|
||||||
MDCTraceUtils.putTraceId(traceId);
|
MDCTraceUtils.putTrace(traceId, spanId);
|
||||||
}
|
}
|
||||||
} else { //服务消费者逻辑
|
} else { //服务消费者逻辑
|
||||||
String traceId = MDCTraceUtils.getTraceId();
|
String traceId = MDCTraceUtils.getTraceId();
|
||||||
if (!StringUtils.isEmpty(traceId)) {
|
if (StrUtil.isNotEmpty(traceId)) {
|
||||||
|
String spanId = MDCTraceUtils.getSpanId();
|
||||||
invocation.setAttachment(MDCTraceUtils.KEY_TRACE_ID, traceId);
|
invocation.setAttachment(MDCTraceUtils.KEY_TRACE_ID, traceId);
|
||||||
|
invocation.setAttachment(MDCTraceUtils.KEY_SPAN_ID, spanId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return invoker.invoke(invocation);
|
return invoker.invoke(invocation);
|
||||||
} finally {
|
} finally {
|
||||||
if (isProviderSide) {
|
if (isProviderSide) {
|
||||||
MDCTraceUtils.removeTraceId();
|
MDCTraceUtils.removeTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -4,6 +4,7 @@ import com.central.log.properties.TraceProperties;
|
|||||||
import feign.RequestInterceptor;
|
import feign.RequestInterceptor;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -17,8 +18,9 @@ import javax.annotation.Resource;
|
|||||||
* Blog: https://zlt2000.gitee.io
|
* Blog: https://zlt2000.gitee.io
|
||||||
* Github: https://github.com/zlt2000
|
* Github: https://github.com/zlt2000
|
||||||
*/
|
*/
|
||||||
|
@Configuration
|
||||||
@ConditionalOnClass(value = {RequestInterceptor.class})
|
@ConditionalOnClass(value = {RequestInterceptor.class})
|
||||||
public class FeignTraceInterceptor {
|
public class FeignTraceConfig {
|
||||||
@Resource
|
@Resource
|
||||||
private TraceProperties traceProperties;
|
private TraceProperties traceProperties;
|
||||||
|
|
||||||
@@ -29,7 +31,9 @@ public class FeignTraceInterceptor {
|
|||||||
//传递日志traceId
|
//传递日志traceId
|
||||||
String traceId = MDCTraceUtils.getTraceId();
|
String traceId = MDCTraceUtils.getTraceId();
|
||||||
if (!StringUtils.isEmpty(traceId)) {
|
if (!StringUtils.isEmpty(traceId)) {
|
||||||
|
String spanId = MDCTraceUtils.getSpanId();
|
||||||
template.header(MDCTraceUtils.TRACE_ID_HEADER, traceId);
|
template.header(MDCTraceUtils.TRACE_ID_HEADER, traceId);
|
||||||
|
template.header(MDCTraceUtils.SPAN_ID_HEADER, spanId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
+35
-5
@@ -1,5 +1,7 @@
|
|||||||
package com.central.log.trace;
|
package com.central.log.trace;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import org.slf4j.MDC;
|
import org.slf4j.MDC;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -18,11 +20,27 @@ public class MDCTraceUtils {
|
|||||||
* 追踪id的名称
|
* 追踪id的名称
|
||||||
*/
|
*/
|
||||||
public static final String KEY_TRACE_ID = "traceId";
|
public static final String KEY_TRACE_ID = "traceId";
|
||||||
|
/**
|
||||||
|
* 块id的名称
|
||||||
|
*/
|
||||||
|
public static final String KEY_SPAN_ID = "spanId";
|
||||||
|
/**
|
||||||
|
* 父块id的名称
|
||||||
|
*/
|
||||||
|
public static final String KEY_PARENT_ID = "parentId";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志链路追踪id信息头
|
* 日志链路追踪id信息头
|
||||||
*/
|
*/
|
||||||
public static final String TRACE_ID_HEADER = "x-traceId-header";
|
public static final String TRACE_ID_HEADER = "x-traceId-header";
|
||||||
|
/**
|
||||||
|
* 日志链路块id信息头
|
||||||
|
*/
|
||||||
|
public static final String SPAN_ID_HEADER = "x-spanId-header";
|
||||||
|
/**
|
||||||
|
* 日志链路父块id信息头
|
||||||
|
*/
|
||||||
|
public static final String PARENT_ID_HEADER = "x-parentId-header";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* filter的优先级,值越低越优先
|
* filter的优先级,值越低越优先
|
||||||
@@ -32,15 +50,19 @@ public class MDCTraceUtils {
|
|||||||
/**
|
/**
|
||||||
* 创建traceId并赋值MDC
|
* 创建traceId并赋值MDC
|
||||||
*/
|
*/
|
||||||
public static void addTraceId() {
|
public static void addTrace() {
|
||||||
MDC.put(KEY_TRACE_ID, createTraceId());
|
String traceId = createTraceId();
|
||||||
|
MDC.put(KEY_TRACE_ID, traceId);
|
||||||
|
MDC.put(KEY_SPAN_ID, traceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 赋值MDC
|
* 赋值MDC
|
||||||
*/
|
*/
|
||||||
public static void putTraceId(String traceId) {
|
public static void putTrace(String traceId, String spanId) {
|
||||||
MDC.put(KEY_TRACE_ID, traceId);
|
MDC.put(KEY_TRACE_ID, traceId);
|
||||||
|
MDC.put(KEY_PARENT_ID, spanId);
|
||||||
|
MDC.put(KEY_SPAN_ID, createTraceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,18 +71,26 @@ public class MDCTraceUtils {
|
|||||||
public static String getTraceId() {
|
public static String getTraceId() {
|
||||||
return MDC.get(KEY_TRACE_ID);
|
return MDC.get(KEY_TRACE_ID);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取MDC中的spanId值
|
||||||
|
*/
|
||||||
|
public static String getSpanId() {
|
||||||
|
return MDC.get(KEY_SPAN_ID);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清除MDC的值
|
* 清除MDC的值
|
||||||
*/
|
*/
|
||||||
public static void removeTraceId() {
|
public static void removeTrace() {
|
||||||
MDC.remove(KEY_TRACE_ID);
|
MDC.remove(KEY_TRACE_ID);
|
||||||
|
MDC.remove(KEY_SPAN_ID);
|
||||||
|
MDC.remove(KEY_PARENT_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建traceId
|
* 创建traceId
|
||||||
*/
|
*/
|
||||||
public static String createTraceId() {
|
public static String createTraceId() {
|
||||||
return UUID.randomUUID().toString().replace("-", "").toUpperCase();
|
return RandomUtil.randomString(16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -3,6 +3,7 @@ package com.central.log.trace;
|
|||||||
import com.central.log.properties.TraceProperties;
|
import com.central.log.properties.TraceProperties;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.filter.OncePerRequestFilter;
|
import org.springframework.web.filter.OncePerRequestFilter;
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ import java.io.IOException;
|
|||||||
* Blog: https://zlt2000.gitee.io
|
* Blog: https://zlt2000.gitee.io
|
||||||
* Github: https://github.com/zlt2000
|
* Github: https://github.com/zlt2000
|
||||||
*/
|
*/
|
||||||
|
@Component
|
||||||
@ConditionalOnClass(value = {HttpServletRequest.class, OncePerRequestFilter.class})
|
@ConditionalOnClass(value = {HttpServletRequest.class, OncePerRequestFilter.class})
|
||||||
@Order(value = MDCTraceUtils.FILTER_ORDER)
|
@Order(value = MDCTraceUtils.FILTER_ORDER)
|
||||||
public class WebTraceFilter extends OncePerRequestFilter {
|
public class WebTraceFilter extends OncePerRequestFilter {
|
||||||
@@ -38,14 +40,15 @@ public class WebTraceFilter extends OncePerRequestFilter {
|
|||||||
FilterChain filterChain) throws IOException, ServletException {
|
FilterChain filterChain) throws IOException, ServletException {
|
||||||
try {
|
try {
|
||||||
String traceId = request.getHeader(MDCTraceUtils.TRACE_ID_HEADER);
|
String traceId = request.getHeader(MDCTraceUtils.TRACE_ID_HEADER);
|
||||||
|
String spanId = request.getHeader(MDCTraceUtils.SPAN_ID_HEADER);
|
||||||
if (StringUtils.isEmpty(traceId)) {
|
if (StringUtils.isEmpty(traceId)) {
|
||||||
MDCTraceUtils.addTraceId();
|
MDCTraceUtils.addTrace();
|
||||||
} else {
|
} else {
|
||||||
MDCTraceUtils.putTraceId(traceId);
|
MDCTraceUtils.putTrace(traceId, spanId);
|
||||||
}
|
}
|
||||||
filterChain.doFilter(request, response);
|
filterChain.doFilter(request, response);
|
||||||
} finally {
|
} finally {
|
||||||
MDCTraceUtils.removeTraceId();
|
MDCTraceUtils.removeTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-6
@@ -2,9 +2,4 @@ org.springframework.context.ApplicationContextInitializer=\
|
|||||||
com.central.log.config.TtlMDCAdapterInitializer
|
com.central.log.config.TtlMDCAdapterInitializer
|
||||||
|
|
||||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||||
com.central.log.config.LogAutoConfigure,\
|
com.central.log.LogAutoConfigure
|
||||||
com.central.log.service.impl.LoggerAuditServiceImpl,\
|
|
||||||
com.central.log.service.impl.DbAuditServiceImpl,\
|
|
||||||
com.central.log.aspect.AuditLogAspect,\
|
|
||||||
com.central.log.trace.WebTraceFilter,\
|
|
||||||
com.central.log.trace.FeignTraceInterceptor
|
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
<!-- 彩色日志格式 -->
|
<!-- 彩色日志格式 -->
|
||||||
<property name="CONSOLE_LOG_PATTERN"
|
<property name="CONSOLE_LOG_PATTERN"
|
||||||
value="[${APP_NAME}:${ServerIP}:${ServerPort}] %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%level){blue} %clr(${PID}){magenta} %clr([%X{traceId}]){yellow} %clr([%thread]){orange} %clr(%-40.40logger{39}){cyan} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}" />
|
value="[${APP_NAME}:${ServerIP}:${ServerPort}] %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%level){blue} %clr(${PID}){magenta} %clr([%X{traceId},%X{spanId},%X{parentId}]){yellow} %clr([%thread]){orange} %clr(%-40.40logger{39}){cyan} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}" />
|
||||||
<property name="CONSOLE_LOG_PATTERN_NO_COLOR" value="[${APP_NAME}:${ServerIP}:${ServerPort}] %d{yyyy-MM-dd HH:mm:ss.SSS} %level ${PID} [%X{traceId}] [%thread] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}" />
|
<property name="CONSOLE_LOG_PATTERN_NO_COLOR" value="[${APP_NAME}:${ServerIP}:${ServerPort}] %d{yyyy-MM-dd HH:mm:ss.SSS} %level ${PID} [%X{traceId},%X{spanId},%X{parentId}] [%thread] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}" />
|
||||||
|
|
||||||
<!-- 控制台日志 -->
|
<!-- 控制台日志 -->
|
||||||
<appender name="StdoutAppender" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="StdoutAppender" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
package com.central.gateway.filter;
|
package com.central.gateway.filter;
|
||||||
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import com.central.common.constant.CommonConstant;
|
|
||||||
import com.central.log.properties.TraceProperties;
|
import com.central.log.properties.TraceProperties;
|
||||||
import org.slf4j.MDC;
|
import com.central.log.trace.MDCTraceUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||||
@@ -31,10 +29,13 @@ public class TraceFilter implements GlobalFilter, Ordered {
|
|||||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||||
if (traceProperties.getEnable()) {
|
if (traceProperties.getEnable()) {
|
||||||
//链路追踪id
|
//链路追踪id
|
||||||
String traceId = IdUtil.fastSimpleUUID();
|
MDCTraceUtils.addTrace();
|
||||||
MDC.put(CommonConstant.LOG_TRACE_ID, traceId);
|
|
||||||
ServerHttpRequest serverHttpRequest = exchange.getRequest().mutate()
|
ServerHttpRequest serverHttpRequest = exchange.getRequest().mutate()
|
||||||
.headers(h -> h.add(CommonConstant.TRACE_ID_HEADER, traceId))
|
.headers(h -> {
|
||||||
|
h.add(MDCTraceUtils.TRACE_ID_HEADER, MDCTraceUtils.getTraceId());
|
||||||
|
h.add(MDCTraceUtils.SPAN_ID_HEADER, MDCTraceUtils.getSpanId());
|
||||||
|
})
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
ServerWebExchange build = exchange.mutate().request(serverHttpRequest).build();
|
ServerWebExchange build = exchange.mutate().request(serverHttpRequest).build();
|
||||||
|
|||||||
Reference in New Issue
Block a user