To write $\int_{\Omega} f d\mu,$ do we require $f$ to be defined *everywhere* in $\Omega?$ When we write the following expression :
$$\int_{\Omega} f d\mu$$
Do we require $f$ to be defined everywhere in $\Omega,$ or is it enough to require $f$ to be defined $\mu$-almost everywhere in $\Omega?$ $($i.e. $\mu\left(\left\{\omega \in \Omega : f(\omega) \text{ is not defined}\right\}\right)=0)$
I ask this question with reference to the following passage from Terence Tao's Introduction to Measure Theory.

Here the term $\int_{\Omega} \left(\lim_{n \to \infty} f_n\right) d\mu$ is used even when $\lim_{n \to \infty} f_n$ is defined $\mu$-almost everywhere in $\Omega$. Any clarification would be appreciated. Thank you.
 A: Strictly speaking, the typical definition of $\int_\Omega f\, d\mu$ assumes that $f$ is a measurable function on $\Omega$, so it must be defined everywhere.  For instance, Tao's Definition 1.4.37 defines the integral of a measurable function $f:X\to[0,+\infty]$, which in particular is a function on $X$ and so is defined at every point of $X$.
However, if $f$ is defined only almost everywhere, you can just extend it to be defined on all the points where it isn't and get a function which is defined everywhere to integrate.  It doesn't matter how you define it on those other points, since they are a set of measure $0$ and so do not affect the integral.  As a result, it is common to abuse notation slightly and speak of the integral of a function that is only defined almost everywhere.
A: We require $f$ to be defined $\mu$-almost everywhere in $\Omega$ (and $\mu$-measurable).
A: The function $f$ does not have to be defined everywhere in $\Omega$; it is enough that it is defined $\mu$-almost everywhere. 
In fact, to be pedantic, what you are integrating is not really a function $f$ but an equivalence class of functions $\tilde{f}$ such that two functions that differ only on a set of measure zero are considered equivalent.
