gpt4 book ai didi

azure - 调用 TelemetryClient.TrackEvent() 后是否能保证 Azure Application Insights 自定义事件的传递?

转载 作者:行者123 更新时间:2023-12-02 07:40:27 26 4
gpt4 key购买 nike

Microsoft 声明 Application Insights 的 SLA 是:

We guarantee that the data latency of the Application Insights Service will not exceed two hours 99.9% of the time.

https://azure.microsoft.com/en-us/support/legal/sla/application-insights/v1_0/

对于 SLA 之外的 0.1% 时间,当 TelemetryClient.TrackEvent() 在我的代码中执行时,Microsoft 是否保证该事件肯定会在某个时间点发布(只是不是在 2 小时内)?或者事件会在这 0.1% 时间内丢失吗?

最佳答案

不,仅仅调用 TrackEvent 并不能保证它被发布,原因有很多:

  1. 在流程的任何级别进行采样。请参阅https://learn.microsoft.com/en-us/azure/application-insights/app-insights-sampling?toc=/azure/azure-monitor/toc.json但一般来说,如果启用采样,部分事件可能会合并在一起。有多种方法可以找到这些事件,但一般来说,如果您在具有相同内容的紧密循环中调用 trackMessage 1000 次,SDK 可能会对其进行采样并使用 itemCount 发送单个事件设置为 1000。

  2. 事件内容可能无效(负载过大、超出字段大小阈值、自定义属性过多、自定义指标过多等)

  3. 事件的时间可能无效。过去太远的事件(>48 小时前?)或太远的 future (不确定那里的确切时间,但允许一些 future 时间来考虑时钟偏差/漂移)

  4. 上限 - 您可能超出每月允许发送的金额 - 请参阅 https://learn.microsoft.com/en-us/azure/application-insights/app-insights-pricing ,在回答这个问题时指出:

    The maximum cap is 1,000 GB/day unless you request a higher maximum for a high-traffic application.

  5. 限制 - 您可能会超出每秒允许的事件数/等等 - 请参阅 https://learn.microsoft.com/en-us/azure/application-insights/app-insights-pricing ,在回答这个问题时指出:

    Throttling limits the data rate to 32,000 events per second, averaged over 1 minute per instrumentation key.

  6. 网络问题等。在各种 SDK 上调用 track 并不能保证数据被接受或重试。有些 SDK 会尝试重试,有些则不会。

  7. 您的应用程序可能会在调用 track 和创建/完成与应用程序洞察的实际连接之间关闭/崩溃。

  8. 其他随机问题、服务问题、其他相关服务的停机时间等占缺失数据的 0.1%。我不确定是否有任何 APM/遥测服务可以保证其 100% 接受并处理您发送的事件。(100% - 99.9% 不是 0.01%,而是 0.1%。有 10 倍的差异。)

关于azure - 调用 TelemetryClient.TrackEvent() 后是否能保证 Azure Application Insights 自定义事件的传递?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53648641/

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