To simply get the variable names you can use trace.varnames
For diagnostics it’s best to use the library ArviZ.
import arviz as az
.....
trace = pm.sample()
idata = az.from_pymc3(trace)
then you can use the many useful functions from ArviZ such as, az.plot_trace(), az.summary(), az.plot_posterior()