Let $(X,d)$ and $(Y,d')$ be metric spaces.
A function $f:X \to Y$ is continuous if $\forall x \in X \forall \epsilon>0 \exists \delta>0: \forall y \in Y d(x,y)<\delta \implies d'(f(x),f(y))<\epsilon$
A function $f:X \to Y$ is measurable if $\forall S \in \mathcal{Y}: f^{-1}(S) \in \mathcal{X}$, where $\mathcal{X}$ and $\mathcal{Y}$ are generated by the open sets.
If $f:X \to Y$ is continuous, is $f$ measurable?
What changes if we generate $\mathcal{X}$ and $\mathcal{Y}$ by the open balls instead of the open sets?
One might think that all continuous functions are measurable. However, this statement depends on the precise definition of continuous and measurable (see e.g. Example of a continuous function that is not measurable).
Based on the help by @Omnomnomnom, I provide an answer for future reference:
Generated by open sets: For the $\epsilon-\delta$ style definition, an equivalent definition is that all preimages of open sets are open (see For continuous functions, preimage of open set is open.). This suffices to prove that $f$ is measurable.
Generated by open balls: