Will I be destroying spherical symmetry if I write the mass of the body as a function of time?
If yes, then how can I write a metric for a body with mass as a function of time?
Will I be destroying spherical symmetry if I write the mass of the body as a function of time?
If yes, then how can I write a metric for a body with mass as a function of time?
Will I be destroying spherical symmetry if I write the mass of the body as a function of time?
I assume you're trying to model what happens when a black hole forms by gravitational collapse, so that its mass increases over time, e.g., you write down the Schwarzschild solution with an increasing mass. The problem with the metric you have in mind isn't that it violates spherical symmetry, it's that it won't be a solution of the field equations. The ADM mass is conserved in an asymptotically flat spacetime for any solution of the field equations.
So what you need here is something like the Vaidya metric, in which the infalling matter is explicitly included.