For any homomorphism $\varphi : A \to \mathbb C$, $\varphi({\rm tr}({\bf 1}))$ will be the corresponding trace for the finite-dimensional vector space $M \otimes_A \mathbb C$, and hence be equal to the rank of $M$ at $\varphi$. So, if $A$ is some algebra of continuous functions on a connected space, then the trace ${\rm tr}({\bf 1})$ is a constant function, equal to the rank of $M$. In general, ${\rm tr}({\bf 1})$ is locally constant.