由于间歇性的网络连接,是否可以使用日志在特定的时间间隔向Azure Application Insights报告

Is it possible to use logs to report to Azure Application Insights at specific time intervals due to intermittent network connectivity

从文档中还不清楚Azure Application Insights如何回溯到Azure云服务。

这里唯一能提供线索的文档并没有确切解释它是如何工作的。我认为,使计划变得更加困难的是,Azure监视器服务是一项,而通过代码应用的实际应用程序的遥测服务是组成整体的另一部分。

这是此文档中的声明:

Does the SDK create temporary local storage?
Yes, certain Telemetry Channels will persist data locally if an endpoint cannot be reached. Please review below to see which frameworks and telemetry channels are affected.

Telemetry channels that utilize local storage create temp files in the TEMP or APPDATA directories which are restricted to the specific account running your application. This may happen when an endpoint was temporarily unavailable or you hit the throttling limit. Once this issue is resolved, the telemetry channel will resume sending all the new and persisted data.

出于我们的目的,计划将使用Azure应用程序见解,但连接最多或多或少。 IE。每12或24小时。

是否有一种计划何时实际ping和使用该服务的方法,或者是否有一种方法可以仅在特定时间间隔提交"日志"?

如果不是,那么斑点/间歇性连接通常会怎样?


ServerTelemetryChannel是将数据持久保存在本地存储中的那个,它将保存数据长达24小时并在建立连接后进行传输。如果没有连接的时间长于连接时间,它将继续尝试,但是一旦连接成功,它将不传输24小时之前的任何内容。还有一个存储大小限制为50 MB。如果您可以每12小时可靠地发送一次数据,那很好,但是没有一种简单的方法可以知道何时传输所有数据,因此计划的连接需要足够长的时间以确保您可以传输所有数据。数据。

另一种选择是创建自己的ITelemetryChannel,以实现计划的数据传输。由于SDK是开源的,因此您可以使用服务器遥测代码来帮助您进行指导。

最后的选择是通过其他某种方式将日志持久存储在本地存储中,然后将其导入到Azure Monitor中。 Data Collector API处于预览状态,但是,只要使用Monitor可以理解的架构发送数据,它就可以让您以所需的任何时间表将数据导入Azure Monitor。