I noticed all the exception loggings in the ‘Failures’ come client Ip zeroed. How do I turn this one or unmask so the client IP is visible on every logging?
I noticed all the exception loggings in the ‘Failures’ come client Ip zeroed. How do I turn this one or unmask so the client IP is visible on every logging?
2
Answers
You need to disable IP-masking. Though it is not possible to through Azure Portal directly you can do it using ARM templates, PowerShell, etc.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/ip-collection?tabs=framework%2Cnodejs
Thanks @ZakiMa for inputs, I do agree and I followed the same Microsoft-Document and as an alternative(if you do not have permissions to use Powershell or ARM and change the settings) way use telemetry with code:
RithIpTest.cs:
In program.cs added:
With the above code, in customdimensions you will able to get the client ip .
Output:
When Client is running:
When run from local:
This will work for traces , failures, requests, etc.