代码之家  ›  专栏  ›  技术社区  ›  Tobias Gassmann

Azure Application Insights多次以相同的时间戳显示同一事件

  •  0
  • Tobias Gassmann  · 技术社区  · 6 年前

    我在Application Insights中跟踪自定义事件。在这个有问题的例子中,当用户加载一个组件(我正在开发一个角度应用程序)时,我在浏览器前端发出一个调用“trackEvent”。

    在ApplicationInsights中,我运行一个查询来列出我的自定义事件。现在在结果列表中,我有相同的事件,所有字段都相同(甚至时间戳以毫秒计)。只有itemId不同。

    仅仅一次调用trackEvent的多个事件从何而来?

    我没有任何相关的源代码提供,因为我只使用这一个调用 跟踪事件 applicationinsights js应用程序 https://github.com/Microsoft/ApplicationInsights-JS )

    好吧,就是这样:

    AppInsights.trackEvent(myName, myProperties, myMeasurements);
    
    0 回复  |  直到 6 年前
        1
  •  1
  •   Tobias Gassmann    6 年前

    在我的情况下,我可以通过设置

    config.isStorageUseDisabled = true;
    

    在传递给Application Insights JS的downloadAndSetup方法的configuration对象中。我还将maxBatchInterval设置为0,这样就不会丢失任何跟踪事件。但我不确定。