Determine EXTEND_SERVICE before invoker createTraceContext (#2755)
This commit is contained in:
parent
e0827e30ea
commit
e0b7306e5d
|
|
@ -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 {
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue