提交 e0b7306e 编写于 作者: Z zhangwei 提交者: wu-sheng

Determine EXTEND_SERVICE before invoker createTraceContext (#2755)

上级 e0827e30
......@@ -44,9 +44,6 @@ public class ContextManager implements BootService {
private static AbstractTracerContext getOrCreate(String operationName, boolean forceSampling) {
AbstractTracerContext context = CONTEXT.get();
if (EXTEND_SERVICE == null) {
EXTEND_SERVICE = ServiceManager.INSTANCE.findService(ContextManagerExtendService.class);
}
if (context == null) {
if (StringUtil.isEmpty(operationName)) {
if (logger.isDebugEnable()) {
......@@ -57,6 +54,9 @@ public class ContextManager implements BootService {
if (RemoteDownstreamConfig.Agent.SERVICE_ID != DictionaryUtil.nullValue()
&& RemoteDownstreamConfig.Agent.SERVICE_INSTANCE_ID != DictionaryUtil.nullValue()
) {
if (EXTEND_SERVICE == null) {
EXTEND_SERVICE = ServiceManager.INSTANCE.findService(ContextManagerExtendService.class);
}
context = EXTEND_SERVICE.createTraceContext(operationName, forceSampling);
} else {
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册