Java Web 应用程序的 Application Insights 中的 TelemetryChannel

TelemteryChannel in ApplicationInsights of Java web application

我们如何在 java 应用程序的 ApplicationInsights.xml 文件中添加自定义遥测通道?

是不是有点像

<TelemetryChannel type="com.test.MyChannel" />

我添加了这一行。但看起来它没有被调用

安装 javaSDK 后,您应该可以从您的代码中调用 API。 TelemetryConfiguration.TelemetryChannel。一些信息here and here

  1. 您的 class 应该实施 TelemetryChannel
  2. 您的 ApplicationInsights.xml 文件中应包含的标签:

<Channel type="com.test.MyChannel" />