Probably the most famous very well behaved analytic function inside unit disc that cannot be meaningfully extended outside is given by the infinite product $\prod_{n\geqslant1}(1-e^{2\pi inx})$. I've seen lots of half-rigorous statements to the effect that this function vanishes at each rational number, hence goes to infinity at all other real numbers, etc.
Let us stick to the case of the upper half plane $\mathfrak H$ with the real line $\mathbb R$ as the analyticity boundary.
Clearly there must be examples of functions analytic in $\mathfrak H$ and with accumulation points of either zeros or poles on $\mathbb R$, which can nevertheless be successfully analytically extended to the lower half plane $\mathfrak H^-$. In fact I think it is true that if a function is analytic in $\mathfrak H$ and both the set of poles and zeros have only finitely many accumulation points on $\mathbb R$ then analytic continuation to at least a neighborhood of $\mathbb R$ does exist.
I suspect that there must be also examples of functions analytic in $\mathfrak H$ and with an infinite number of accumulation points of zeros and poles on $\mathbb R$ which can nevertheless be analytically extended to a neighborhood of $\mathbb R$. Do you know any examples?
There is even more sophisticated approach, related to the notion of quantum modular form by Zagier: one looks at limits along lines perpendicular to $\mathbb R$ and asks for a function defined below $\mathbb R$ with the property that whenever our original function has a finite such limit when approaching $\mathbb R$ from above, then that other function should have the same limit when approaching the same point from below. Zagier in that paper amusingly talks about some sort of "leaking":
One then gets a peculiar kind of object: an analytic function in the upper half-plane which “leaks” into the lower half-plane through the infinitely many “holes” $\mathbb Q \subset \mathbb R$ in the real axis to another analytic function in $\mathfrak H^-$ in such a way that the combined function on $\mathfrak H \cap \mathbb Q \cap \mathfrak H^-$ is $C^\infty$ on any vertical line passing through a rational point, or more generally on any smooth curve in $\mathbb C$ which intersects $\mathbb R$ only orthogonally and in rational points.
Here I suspect that there might be many examples when such functions indeed exist but are not unique, but again am not aware of any examples.
Main question: where to read about this stuff? What are the efficient keywords for googling?
Specifically, is it known which subsets of $\mathbb R$ are admissible as singular sets of the above kind such that analytic continuation in Zagier's sense is still possible? (I suspect that "orthogonally" may be replaced by "transversally" there)