I will attach the beam to the existing wall framing, your 10 foot 2x4s.You only need to sit into the wall an inch and a half.
This is really not considered a weight carrying beam unless it is a hip roof with rafters.
I have also used a joist hanger nailed to the wall because it gets covered.Make sure it is for exterior use.
Or you go with the post at the end of the house and tie your railings into it.
I'm sure you get the general idea, your on the right track.
I love front porches....they should be on every home.