When Samwise is fighting Shelob, he eventually fends her off with the Phial of Galadriel. I can only imagine that explosions of Elven magic are a rare thing in Mordor and should have alerted the attention of the All Seeing Eye. Is there any canon explanation of why this particularly mystical event (even without the assault, perhaps death, of a demigod...) didn't grab Sauron's attention?
'For do I not guess rightly, Aragorn, that you have shown yourself to him in the Stone of Orthanc?'
'I did so ere I rode from the Hornburg,' answered Aragorn. 'I deemed that the time was ripe, and that the Stone had come to me for just such a purpose. It was then ten days since the Ring-bearer went east from Rauros, and the Eye of Sauron, I thought, should be drawn out from his own land. Too seldom has he been challenged since he returned to his Tower.'
I'm not sure of the exact timing, but even if the events weren't on the same day, at least Aragorn's attention-grabbing was close, probably just before the hobbits used the Phial. Sauron was thus dealing with a major distraction.
And it worked - the day after Shelob's attack, when Frodo and Sam first saw Mount Doom (and behind it, Barad-Dur, where Sauron dwelt):
The Dark Power was deep in thought, and the Eye turned inward, pondering tidings of doubt and danger: a bright sword, and a stern and kingly face it saw, and for a while it gave little thought to other things; and all its great stronghold, gate on gate, and tower on tower, was wrapped in a brooding gloom.
As a second point - to address Sebastian_H's point about whether the All-Seeing Eye, can pierce everything - when Sam used the Ring inside Mordor:
Immediately he felt the great burden of its weight, and felt afresh, but now more strong and urgent than ever, the malice of the Eye of Mordor, searching, trying to pierce the shadows that it had made for its own defence, but which now hindered it in its unquiet and doubt.
Shadows and darkness, made by Sauron, would probably block out at least some of the effects of using the Phial, if not all.
Note: the quotes are from Houghton-Mifflin's 50th Anniversay one-volume edition (paperback), the respective pages are: 879, 923, 898
Shelob, a descendant of the void demon Ungoliant, had the ability to eat light. It is quite possible that her “web” was trapping light as well as other things to eat. Thus, the light of the phial was bright at the epicentre but subdued from further away being dampened by the web.
In addition, I believe that there were obstacles between the phial and the Eye, making it hard to impossible to see a hundred miles or so away.
Also, I cannot remember the weather conditions at the time of the fight. From a quick look at the map, Mount Doom is between Barad-Dur and Shelob’s lair and we knew that it was active at the time — thus spewing ash, hampering sight.
Of course, magic sight may not work in the same way as normal sight.
BTW, Shelob did not die. She was “just” severely wounded if memory serves well.
There's no evidence in Tolkien to suggest that Sauron has any capability to notice "explosions of Elven magic", either in Mordor or outside of it.
The only suggestion of magic that draws attention is Gandalf's statement in Fellowship:
'If there are any to see, then I at least am revealed to them,' he said. 'I have written Gandalf is here in signs that all can read from Rivendell to the mouths of Anduin.'
Gandalf, however, is not an Elf.
More specifically, he's a Maia, and one thing that Maiar are notable for (particularly when they "uncloak" their power) is their powerful and intimidating presence.
Something was coming up behind them. What it was could not be seen: it was like a great shadow, in the middle of which was a dark form, of man-shape maybe, yet greater; and a power and terror seemed to be in it and to go before it.
It came to the edge of the fire and the light faded as if a cloud had bent over it.
In the wavering firelight Gandalf seemed suddenly to grow: he rose up, a great menacing shape like the monument of some ancient king of stone set upon a hill. Stooping like a cloud, he lifted a burning branch and strode to meet the wolves. They gave back before him. High in the air he tossed the blazing brand. It flared with a sudden white radiance like lightning; and his voice rolled like thunder.
Notice any similarity?
We can't be even certain that this was "magic". Gandalf is associated with fire, and there were plenty of other occasions in Fellowship (the Warg attack I quote from above, Gandalf's fight against the Nazgul on Weathertop, his "Word of Command", even casting light from his staff) where he doesn't display this concern.
So in the absence of anything to indicate that Sauron is able to notice Elven magic, it's more appropriate to ask: "why should he notice this?"
I'll add to the helpful suggestions above,
(A) As the Orcs took Merry and Pippin to Saruman, Sauron suspected treachery and was focused that way;
(B) The narrative suggests everyone thought Merry and Pippin had the ring (well, one of them, anyways), the Orcs saying they had something important for the master, and one even trying to separate them and take it
(C) the 2 units of The Two Towers coincide chronologically, the 1st part in the Rohan narrative and the 2nd with Frodo and Sam, so by the time Gollum leads them to Shelob, the West (Rohan) is at War and Sauron is watching Saruman vs. Rohan (again, thinking the ring is there for the victor)
(D) Since the stronghold of the Orcs was higher up the mountain, presumably the incident with Shelob was on the exterior of the mountains and lower down the mountain out of sight? I use a question mark here b/c I'm going on memory.
(E) And, of course, Aragorn revealed himself in the palantir for precisely such a purpose, to keep Sauron's eye focused at a distance instead of within his own realm where Frodo and Sam would have to take the ring.
They were in a cave.
The all seeing eye does not see through walls.
It's positioned in a way to see mostly everything for miles and miles, but it cannot see in every crack of the land.
Shelob's darkness was overpowered by the light of the phial when Shelob was wounded, but even her darkness could've been pierced by the eye were they in open terrain (Sauron's power is a lot greater than Shelob's, even though she's a descendant of a truly epic spider of doom).
The quote about the shadows has no bearing on Sauron not being aware of the phial.