  Optimal linear prediction (aka. kriging) of a random field
$\{Z(x)\}_{x\in\mathcal{X}}$ indexed by a compact metric space
$(\mathcal{X},d_{\mathcal{X}})$ can be obtained if the mean value function
$m\colon\mathcal{X}\to\mathbb{R}$ and the covariance function
$\varrho\colon\mathcal{X}\times\mathcal{X}\to\mathbb{R}$ of $Z$ are known. We
consider the problem of predicting the value of $Z(x^*)$ at some location
$x^*\in\mathcal{X}$ based on observations at locations $\{x_j\}_{j=1}^n$ which
accumulate at $x^*$ as $n\to\infty$ (or, more generally, predicting
$\varphi(Z)$ based on $\{\varphi_j(Z)\}_{j=1}^n$ for linear functionals
$\varphi,\varphi_1,\ldots,\varphi_n$). Our main result characterizes the
asymptotic performance of linear predictors (as $n$ increases) based on an
incorrect second order structure $(\tilde{m},\tilde{\varrho})$, without any
restrictive assumptions on $\varrho,\tilde{\varrho}$ such as stationarity. We,
for the first time, provide necessary and sufficient conditions on
$(\tilde{m},\tilde{\varrho})$ for asymptotic optimality of the corresponding
linear predictor holding uniformly with respect to $\varphi$. These general
results are illustrated by weakly stationary random fields on
$\mathcal{X}\subset\mathbb{R}^d$ with Mat\'ern or periodic covariance
functions, and on the sphere $\mathcal{X}=\mathbb{S}^2$ for the case of two
isotropic covariance functions.
