Suppose $X$ is a set with a metric $d: X \times X \rightarrow \mathbb{R}$. What "operations" on $d$ will yield a metric in return?
By this I mean a wide variety of things. For example, what functions $g: \mathbb{R} \rightarrow \mathbb{R}$ will make $g \circ d$ into a metric, for example $g \circ d = \sqrt{d}$. Or what functions of metrics will yield metrics in return, for example $d_1 + d_2$, where $d_1$ and $d_2$ are distinct metrics on $X$.
I'm looking for a list of such operations, and counterexamples of ones which plausibly seem like they could define a metric but do not.