$f(x,y)$, continuous in $x$. Is $\sup_{x\in A}f(x,y)$ measurable? $X\subset \mathbb{R}^d$, uncountable, not necessarily compact.
$(Y,\mathcal{F}_Y,\mu)$: measure space.
$f\colon\,X\times Y\to \mathbb{R}$ , continuous in $X$ for each $\mu$-a.e. $y$,, and $\mathcal{F}_Y/\mathcal{B}(\mathbb{R})$-measurable for each $x$.
Letting $g(y):=\sup_{x\in X}f(x,y)$, if $g(y)<\infty$ $\mu$-a.e., is this $\mathcal{F}_Y/\mathcal{B}(\mathbb{R})$-measurable?
My attempt:
Following, 
Measurability of the supremum of a Brownian motion
I considered $$\sup_{x\in X\cap \mathbb{Q}^d}f(x,y),$$
noting that $\mathbb{Q}^d$ is dense in $(\mathbb{R},\|\cdot\|_2)$ (by $\|\cdot\|_2$ I mean Euclidean norm topology).
But I got confused by this question: Supremum over dense subset of banach space does $X$ need to be compact?

I have asked a similar question before on essential supremum: Is ess sup of product measurable function measurable?. 
For the supremum case I had the property of Caratheodory functions (18.19 in Infinite Dimensional Analysis: A Hitchhiker's Guide By Charalambos D. Aliprantis, Kim C. Border). But for that it seems $X$ needs to be compact.
I see many questions such as Supremum of a product measurable function..., but it doesn't seem they answer my question.
 A: Yes, $g$ is measurable, whether or not $g$ is $\mu$-a.e. finite, whether or not $X$ is compact, and whatever $X$'s cardinality is. Moreover, we shall require $X$ to be merely a separable metric space, not necessarily $\mathbb{R}^d$.
We shall assume, w.l.g., that $x\mapsto f(x,y)$ is continuous for all $y \in Y$.
Let $D$ be a countable, dense subset of $X$ (every subspace of a separable metric space is separable too). Then, for every $y \in Y$, since $x \mapsto f(x,y)$ is a continuous function $X\rightarrow\mathbb{R}$, we have $\sup_{x\in X} f(x,y) = \sup_{x\in D} f(x,y)$. Therefore, $g = \sup_{x\in D} f(x,\cdot)$. This is the supremum of a countable number of $\mathcal{F}_Y/\mathcal{B}(\mathbb{R})$-measurable functions, and hence is $\mathcal{F}_Y/\mathcal{B}(\overline{\mathbb{R}})$-measurable, where $\overline{\mathbb{R}}$ is the extended real line. If, additionally, $g$ is finite, it is $\mathcal{F}_Y/\mathcal{B}(\mathbb{R})$-measurable.

As per OP's request, I will show that the result does not necessitate $X$ being compact.
Claim Let $(\Omega,\tau)$ be a topological space, and let $D$ be a $\tau$-dense subset of $\Omega$. Denoting the Euclidean topology on $\mathbb{R}$ by $\mathcal{E}$, let $f:\Omega\rightarrow \mathbb{R}$ be a $\tau/\mathcal{E}$-continuous function. Then $\sup_{x\in \Omega} f(x) = \sup_{x\in D}f(x)$.
Proof
Set
$$
\begin{align}
s_1 &:= \sup_{x\in \Omega} f(x) \\
s_2 &:= \sup_{x\in D}f(x).
\end{align}
$$
We wish to show that $s_1 = s_2$.
Since $D\subseteq \Omega$, $s_1 \geq s_2$. As for the other direction, it suffices to show that, for every $\varepsilon \in (0,\infty)$, $s_2 > s_1-\varepsilon$. Let then $\varepsilon \in (0,\infty)$. Choose $y \in \Omega$ such that $f(y) > s_1 - \varepsilon/2$. Since $f$ is $\tau/\mathcal{E}$-continuous at $y$, there is some $\tau$-neighborhood of $y$, $G$, such that, for every $z \in G$, $|f(y)-f(z)| < \varepsilon/2$. Let $z \in G\cap D$ ($D$ being dense in $\Omega$, $G\cap D \neq \emptyset$). Then $s_2 \geq f(z) > s_1-\varepsilon$, Q.E.D.
