I have created an observer listening to the event controller_action_predispatch
on a clean Magento 2.4.2 instance, and I tried to get the module name and full action name from within the observer. It worked well for all pages except the product pages.
For example, for the registration page:
$observer->getEvent()->getRequest()->getModuleName() // it gives "customer"
$observer->getEvent()->getRequest()->getFullActionName() // it gives "customer_account_create"
and for shopping cart page:
$observer->getEvent()->getRequest()->getModuleName() // it gives "checkout"
$observer->getEvent()->getRequest()->getFullActionName() // it gives "checkout_cart_index"
but when I tried to capture the above info for the product pages
$observer->getEvent()->getRequest()->getModuleName() // it gives ""
$observer->getEvent()->getRequest()->getFullActionName() // it gives "__" (2 underscores)