Moving Angle Sensor

Hey guys, I'm trying to make something that essentially records angular position and/or range of motion (think elbow bending while arm moving). I've been looking into different sensors but have run into some problems. Initially I was considering using a triple-axis accelerometer but through my research I found that they really only work if they remain stationary, and my device is going to be moving. A shaft encoder isn't really practical in this case because it sticks out too much. I'm also considering a hall-effect angle sensor but am having trouble figuring out how to place a magnet in such a way that the sensor can move within the field to get a measurement. Anyone have any ideas that might help? Thank you.

A fairly simple setup using pots as the position sensors.

Use an IR or ultrasonic distance sensor between the two arms that are moving?

Really, a shaft sensor like a MA12 from US Digital is more likely to do a better job. Are you totally sure you can't fit one of them in?