Narrative:

I was flying from west to east at 3;800 ft. ATC (125.90) warn me about other aircraft coming from 10 o-clock and he is 100 feet below me. Now B airspace for sfo was at 4;000ft. While I was looking for traffic we are getting closer; so I thought I should climb to avoid this traffic. Then when I saw the traffic below me I announced traffic insight and saw him flew by below me. After I turn my focus on flying but then I was at 4;100 feet; then I quickly decent back to 3;500 feet.the ground below me was about 2;000 feet; which is why I chose to climb up. I was in B airspace without clearance for short period of time. I bust B airspace by 100 feet or less. Also; I was on the edge of B at 4;000 feet and 6;000 feet. The location of occurrence was at waypoint colli about 8nm northeast of oak.in order for me to prevent this from happening again I should ask ATC for advice if I should climb or turn. I also need to pay attention to my altitude while looking for traffic. However; I can not be certain that if I were to stay at 3;900 feet and would avoid that traffic because that aircraft seem to be close while flying below me.

Google
 

Original NASA ASRS Text

Title: A small aircraft pilot 8 NM northeast of OAK flying eastbound at 3;800 feet to avoid oncoming traffic; climbed into SFO Class B at 4;100 feet as traffic passed 100 feet below him.

Narrative: I was flying from West to East at 3;800 ft. ATC (125.90) warn me about other aircraft coming from 10 o-clock and he is 100 feet below me. Now B airspace for SFO was at 4;000ft. While I was looking for traffic we are getting closer; so I thought I should climb to avoid this traffic. Then when I saw the traffic below me I announced traffic insight and saw him flew by below me. After I turn my focus on flying but then I was at 4;100 feet; then I quickly decent back to 3;500 feet.The ground below me was about 2;000 feet; which is why I chose to climb up. I was in B airspace without clearance for short period of time. I bust B airspace by 100 feet or less. Also; I was on the edge of B at 4;000 feet and 6;000 feet. The Location of occurrence was at waypoint COLLI about 8nm northeast of OAK.In order for me to prevent this from happening again I should ask ATC for advice if I should climb or turn. I also need to pay attention to my altitude while looking for traffic. However; I can not be certain that if I were to stay at 3;900 feet and would avoid that traffic because that aircraft seem to be close while flying below me.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.