The process of measurement, leads to a collapse of the wave function to one of the eigenstates with a certain probability. The eigen basis which gives this probability distribution is definitely related the measurement apparatus.
For example, consider a system described by a wave function $|\Psi\rangle \in \mathcal{H}$, where $\mathcal{H}$ is complex vector space or Hilbert space. Now, according to postulates of quantum mechanics every observable has a corresponding operator defined on $\mathcal{H}$. Let's consider on such operator that corresponds to the total energy, which happens to be the Hamiltonian operator $\hat{\mathbb{H}}$.
Here we define $\hat{\mathbb{H}}:\mathcal{H}\rightarrow\mathcal{H}$ as a linear transformation that maps any $|\Phi\rangle \rightarrow |\Theta\rangle$ where $|\Phi\rangle,|\Theta\rangle \in \mathcal{H}$.
Now, when we say we make a measurement, let's assume that it would be associated with an observable. Then, there should be an operator on $\mathcal{H}$ that is associated to such a measurement. Mathematically, we can define a measurement apparatus using the eigen states of the operator associated with the observable we want to measure. So, a measurement apparatus that measures the energy can be defined as,
$$
\hat{\mathbb{P}}_{\varepsilon} = \sum_{i} |\chi_{i}\rangle\langle\chi_{i}| = \mathbb{1}
$$
where $|\chi_{i}\rangle$'s are eigen kets associated with $\hat{\mathbb{H}}$ where $\hat{\mathbb{H}}|\chi_{i}\rangle=\varepsilon_{i}|\chi_{i}\rangle$. Now, projecting this operator into its own eigen basis gives us,
$$
\hat{\mathbb{P}}_{\varepsilon}\hat{\mathbb{H}} = \sum_{i} |\chi_{i}\rangle\langle\chi_{i}| \hat{\mathbb{H}}\\\hat{\mathbb{H}} = \sum_{i} |\chi_{i}\rangle\varepsilon_{i}\langle\chi_{i}|
$$
Now, if you have the Hamiltonian act on the wave function we get,
$$
\hat{\mathbb{H}} |\Psi\rangle = \sum_{i} |\chi_{i}\rangle\varepsilon_{i}\langle\chi_{i} |\Psi\rangle\\
= \sum_{i} \varepsilon_{i} c_{i}|\chi_{i}\rangle
$$
where $c_{i} = \langle\chi_{i} |\Psi\rangle$ is the amplitude of the $i$th eigen state, or in other words, $|c_i|^2$ is probability for the wave function $|\Psi\rangle$ to collapse to the $i$th energy eigen state upon measurement.
Further, it also follows that the expectation value of the Hamiltonian is given as,
$$
E_{\Psi} = \langle \Psi |\hat{\mathbb{H}}|\Psi\rangle = \sum_{i} \varepsilon_{i} |c_{i}|^{2}
$$
To summarize, the collapse of the wave function $|\Psi\rangle$ upon measurement, is dependent on the measurement apparatus i.e. it collapses to one of the eigen states of the observable being measured with a certain probability. Finally, when you make measure in quantum mechanics, what you measure are the probability distributions.