One way that I have accomplished this in the past was by adding a request attribute to Dynatrace (Settings --> Server side service monitoring --> Request Attributes) to track the 'x-forwarded-for' header. You will then get something like the below:
(Demo env. but blurring for privacy)
This shows that this particular request was forwarded for two IP addresses. The first IP address is actually the client IP. This also is useful as it shows you any hops that a request may take along the way.
I recommend giving this a shot if the 'x-forwarded-for' request header is available.
Hope this helps,
Vlad please let us know what "does not work" Did you add the request parameter to monitoring as it was described / (Settings --> Server side service monitoring --> Request Attributes) to track the 'x-forwarded-for' header/. Is the client (or e.g. firewall or load balancer) adding this 'x-forwarded-for' parameter ?