public TraceScope newScope(String description){
  TraceScope parentScope=threadLocalScope.get();
  ThreadContext context=threadContext.get();
  if (parentScope != null) {
    return newScopeImpl(context,description,parentScope);
  }
  if (!context.isTopLevel()) {
    context.pushScope();
    return nullScope;
  }
  if (!sample()) {
    context.pushScope();
    return nullScope;
  }
  return newScopeImpl(context,description);
}

public TraceScope newScope ( String description ) { TraceScope parentScope = threadLocalScope . get ( ) ; ThreadContext context = threadContext . get ( ) ; if ( parentScope != null ) { return newScopeImpl ( context , description , parentScope ) ; } if ( ! context . isTopLevel ( ) ) { context . pushScope ( ) ; return nullScope ; } if ( ! sample ( ) ) { context . pushScope ( ) ; return nullScope ; } return newScopeImpl ( context , description ) ; }
create a new trace scope . if there are no scopes above the current scope , we will apply our configured samplers . otherwise , we will create a trace span only if this thread is already tracing .
