@Component public class DubboTraceContext extends AbstractTraceContext implements RpcTraceContext
logger| 构造器和说明 |
|---|
DubboTraceContext() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addRpcContext()
调用远程rpc接口,将threadLocal中TraceDTO赋值给rpcContext
|
void |
consumer(@NotNull Consumer<TraceDTO> traceDTOConsumer) |
protected TraceDTO |
map2TraceDto(Map<String,String> map) |
TraceDTO |
product()
1. dubbo消费者 : 获取threadLocal中dto并添加到RpcContext中
2. restTemplate : 获取threadLocal中dto并添加到请求头中
3. mq生产者 : 获取threadLocal中dto 并添加到message中properties属性
|
protected Map<String,String> |
traceDto2Map(TraceDTO traceDTO) |
getContextAndSpanIdPlusOne, getThreadLocalTraceDto, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcollectLog, getContext, getThreadLocalTraceDtopublic void consumer(@NotNull
@NotNull Consumer<TraceDTO> traceDTOConsumer)
consumer 在接口中 RpcTraceContextpublic TraceDTO product()
RpcTraceContextproduct 在接口中 RpcTraceContextpublic void addRpcContext()
RpcTraceContextaddRpcContext 在接口中 RpcTraceContextCopyright © 2018. All rights reserved.