gpt4 book ai didi

azure - 在 Azure Application Insights 中禁用地理定位

转载 作者:行者123 更新时间:2023-12-04 04:12:53 25 4
gpt4 key购买 nike

我正在创建一个开源项目,在其中使用 Application Insights 将指标添加到桌面应用程序。我希望将隐私放在数据收集的最前沿,因此我会尽力不收集超出绝对必要的数据,并且一般来说,根本不收集任何个人身份信息。我似乎已经成功地删除了发送到服务器的数据,这是一个数据上传的示例:

{"ver":1,"name":"Microsoft.ApplicationInsights.guid.Event","time":"2020-04-25T03:31:15.464+0200","sampleRate":100.0,"iKey":"guid","tags":{"ai.internal.nodeName":"aeb804e4-c649-4a9c-bd57-905c7e81abf3","ai.session.id":"aeb804e4-c649-4a9c-bd57-905c7e81abf3","ai.session.isNew":"true"},"data":{"baseType":"EventData","baseData":{"ver":2,"name":"application.startupMode","properties":{"mode":"help"}}}

除了我擦洗的检测 key 之外,这是我发送的完整数据,如您所见,完全不涉及用户。 session ID 会重置程序的每次运行。然而,无论如何,地理位置似乎正在发生,而且我可以在 Application Insights 中看到比我想要的更多详细信息,并且详细到城市。我没有足够的用户来进行匿名化,因此可能每个城市都是一个唯一的用户(甚至可能是整个国家/地区),并且用户之间不会有足够的重复,因此这是不可逆转的。

Image from the portal

我已从此图像中删除了地理位置数据。

因此,我想完全阻止记录这些数据,或者至少阻止我访问这些数据。这可以吗?我什至可以伪造数据,但我宁愿不必设置代理服务器或类似的复杂东西。

最佳答案

您可以通过自己明确设置城市/州/国家来实现这一点。如果在传入事件中设置了其中任何一个,则不会完成基于 IP 地址的 GeoIP 查找。

参见bond specification ,相关部分在这里:

[Description("The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.")]
[MaxStringLength("46")]
200: string LocationIp = "ai.location.ip";

[Description("The country of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.")]
[MaxStringLength("256")]
201: string LocationCountry = "ai.location.country";

[Description("The province/state of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.")]
[MaxStringLength("256")]
202: string LocationProvince = "ai.location.province";

[Description("The city of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.")]
[MaxStringLength("256")]
203: string LocationCity = "ai.location.city";

我不是100%确定如何在Java sdk中设置它们,但我知道后端支持它(因为我是很久以前添加它的人)

假设您可以将 context.country 设置为字符串 "Unknown" 或其他内容,以便不生成所有其余字段。

关于azure - 在 Azure Application Insights 中禁用地理定位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61420102/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com