I've taken sertraline for quite a while now. If I remember right, I must have started it three and a half years ago. I'm taking it for depression, not anxiety, and it helps a lot. I still have depression to a pretty problematic degree, but without any medication, I'm much worse, potentially suicidal. I still have a lot of social anxiety; I'm not sure whether it made a difference in that regard.
I haven't taken it that entire three and a half years. My significant other complained that it killed my sex drive and made me gain weight, so I tried another medication (venlafaxine) and then nothing. Reason #129530 I'm happy to be single: I can be as fat and sexually abstinant as I want! Mwhahaha!
I'm on the smallest dose, 50mg. My doctor thought it would be a good idea to increase my dose since I'm still pretty depressed, but it causes me to have trouble sleeping, so I can't tolerate the higher dose.
In the future, I might try switching to a different treatment since this one is imperfect, but I need to be careful about when I stop it because it's so, so much better than nothing.