Brown discharge 5 weeks pregnant

Brown discharge and thinking I am having a miscarriage. I was spotting like this yesterday and still having it today. 5 weeks pregnant and second pregnancy. Anyone had this happen?