简体   繁体   中英

How can I hide Client IP address in Application Insights?

I've tried to add the following TelemetryInitializer:

TelemetryConfiguration.Active.TelemetryInitializers.Add(new HiddenIpsTelemetryInitializer());

public class HiddenIpsTelemetryInitializer : ITelemetryInitializer
{
    public void Initialize(ITelemetry telemetry)
    {
        telemetry.Context.Properties["Client IP address"] = "Hidden";
    }
}

But it doesn't do what I want. It adds a new property to "Custom Data" section, and what I want is to hide the "Client IP address" in "Request Properties" section.

There was a service announcement recently on AI Service blog informing that IP will be zeroed out after AI has extracted Geo location information from it.

This is done to make sure the privacy concerns of AI customers are addressed in light of upcoming GDPR law in EU .

So, you do not need to hide it anymore.

you need to change the value of telemetry.Context.Ip instead of what you are doing. anything inside properties named like that would be submitting new custom properties.

to see how AI collects it in the core .net sdk, see: LocationContext.cs in the core sdk on github

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM