gpt4 book ai didi

azure - Application Insights 中没有自定义事件

转载 作者:行者123 更新时间:2023-12-03 02:45:10 25 4
gpt4 key购买 nike

尝试在 Application Insights 中创建自定义事件,但它未显示在 Azure 门户上。所有其他事件(例如请求、依赖项、异常)都是可见的。

我已经在 dotnet core 中尝试过,可以在调试日志中看到以下内容,但门户中仍然没有事件,甚至自定义事件表为空:

Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights.Dev.<instrumentkey>.Event","time":"2019-12-05T19:16:34.1373921Z","iKey":"<instrument key>","tags":{"ai.application.ver":"1.0.0.0","ai.cloud.roleInstance":"<role>","ai.session.id":"<session>","ai.user.id":"<user>","ai.operation.id":"<operation>","ai.operation.parentId":"|<some ids>","ai.operation.name":"GET /auth/login","ai.location.ip":"::1","ai.internal.sdkVersion":"dotnetc:2.11.0-21474","ai.internal.nodeName":"<subscription>"},"data":{"baseType":"EventData","baseData":{"ver":2,"name":"SAML_Authentication_Initiated","properties":{"DeveloperMode":"true","AspNetCoreEnvironment":"Local"}}}}

也尝试过 JavaScript,可以在浏览器控制台中看到以下成功的发布请求:

POST https://dc.services.visualstudio.com/v2/track

[{"time":"2019-12-05T19:00:21.781Z","iKey":"<instrumentkey>","name":"Microsoft.ApplicationInsights.<instrumentkey>.Event","tags":{"ai.user.id":"<user>","ai.session.id":"<session>","ai.device.id":"browser","ai.device.type":"Browser","ai.operation.name":"/public","ai.operation.id":"<operationid>","ai.internal.sdkVersion":"javascript:2.3.1"},"data":{"baseType":"EventData","baseData":{"ver":2,"name":"CustomEvent","properties":{},"measurements":{}}}}]

回应

{"itemsReceived":1,"itemsAccepted":1,"errors":[],"appId":"<application id>"}

不确定 Azure 需要多少时间来处理自定义事件,或者我应该创建支持票证,还是我最后出现了问题。

最佳答案

应用程序洞察通常需要 3-5 分钟才能开始在门户中显示数据,请参阅此 official doc注意部分。 .

如果担心数据丢失,可以使用Flush()方法。

如果数据总是需要超过 5 分钟才能出现在门户中,您应该考虑 opening a support ticket获得专业帮助。

关于azure - Application Insights 中没有自定义事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59202065/

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