  The metric dimension of a graph $G$ is the minimal size of a subset $R$ of
vertices of $G$ that, upon reporting their graph distance from a distingished
(source) vertex $v^\star$, enable unique identification of the source vertex
$v^\star$ among all possible vertices of $G$. In this paper we show a Law of
Large Numbers (LLN) for the metric dimension of some classes of trees: critical
Galton-Watson trees conditioned to have size $n$, and growing general linear
preferential attachment trees. The former class includes uniform random trees,
the latter class includes Yule-trees (also called random recursive trees),
$m$-ary increasing trees, binary search trees, and positive linear preferential
attachment trees. In all these cases, we are able to identify the limiting
constant in the LLN explicitly. Our result relies on the insight that the
metric dimension can be related to subtree properties, and hence we can make
use of the powerful fringe-tree literature developed by Aldous and Janson et
al.
