IIRC the majority of foreigners in Japan are from other Asian countries and experience varying degrees of discrimination despite many of them being able to at least outwardly pass as Japanese. According to the latest info in Wikipedia, the top countries are China, Vietnam, Korea, Phillippines, and Brazil.
Brazil is an interesting one, because a significant number of "Brazilians" in Japan are supposedly descendants of Japanese who had immigrated to Brazil, but then came back. But even they experience degrees of discrimination despite being ethnically Japanese.
Anecdote, but my Japanese American friend (ethnically 100% Japanese but born and raised in the US, and pretty much culturally 90%+ American) went back to Japan. He too experienced discrimination.
I think they are well tolerated, but still you are always going to be American/French/Russian there. I've been to Japan and everyone was for the most part very nice, invited me to their homes, etc. However, it felt almost ceremonial (for lack of a better word). I was in Tokyo and surrounding area which I hear is very different from the more rural areas.
Brazil is an interesting one, because a significant number of "Brazilians" in Japan are supposedly descendants of Japanese who had immigrated to Brazil, but then came back. But even they experience degrees of discrimination despite being ethnically Japanese.
Anecdote, but my Japanese American friend (ethnically 100% Japanese but born and raised in the US, and pretty much culturally 90%+ American) went back to Japan. He too experienced discrimination.