Allow the context carrier is null when creating entry span.

This commit is contained in:
wusheng 2017-07-02 21:10:49 +08:00
parent 1c8200116d
commit 945f68b9b1
1 changed files with 1 additions and 4 deletions

View File

@ -77,12 +77,9 @@ public class ContextManager implements TracingContextListener, BootService, Igno
}
public static AbstractSpan createEntrySpan(String operationName, ContextCarrier carrier) {
if (carrier == null) {
throw new IllegalArgumentException("ContextCarrier can't be null.");
}
SamplingService samplingService = ServiceManager.INSTANCE.findService(SamplingService.class);
AbstractTracerContext context;
if (carrier.isValid()) {
if (carrier != null && carrier.isValid()) {
samplingService.forceSampled();
context = getOrCreate(operationName, true);
context.extract(carrier);