You can only specify methods without values for the deep object access. Thus you can only do the .getVariables() in your case. If you can’t modify your code, then you will need to find a more suitable method for the request attribute capture. Maybe in the code where the variable is generated.
If you can modify the code, you can leverage the OneAgent SDK to return push the request attribute value.