As we know, the first law of thermodynamic is $ dE=TdS-PdV+\mu dN $. is it true for a generic metric? what is the covariant form of this equation? for example, I think chemical potential and number density will be corrected as follow: \begin{equation} \epsilon=Ts-P+A_{\mu}J^{\mu} \end{equation} where $A_{0}$ is chemical potential.