Hi, yes it works in either - Java based. I have seen a number of accounts monitoring pega seeing great value.
Definitely make sure that you are using UEM (AppMon) or RUM (dynatrace) alongside - it gives you a great wealth of more monitoring - since the URLs are encoded featuring a session ID, the user actions provides so much more help here, as with any app.
Also, alongside Gary's answer, you might have to explore custom JS injection for the UEM (AppMon) and RUM (Dynatrace) components. We're doing client side monitoring on the Pega system and found that we had to generate the snippet and manually inject the JS to enable UEM and RUM to work properly.
Something to keep in mind if you find that the user tracking is not working properly.