我有天蓝色弹簧启动服务和运行,我有配置的应用洞察力在Azure。下面有代码更改
pom.xml如下所示
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-spring-boot-starter</artifactId>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-logging-logback</artifactId>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-core</artifactId>
<version>2.6.4</version>
</dependency>我的logback-spring.xml如下所示。
<springProperty scope="context" name="INSTRUMENTATION_KEY"
source="azure.application-insights.instrumentation-key"/>
<appender name="aiAppender"
class="com.microsoft.applicationinsights.logback.ApplicationInsightsAppender">
<instrumentationKey>${INSTRUMENTATION_KEY}</instrumentationKey>
</appender>我的application.yml文件如下,
azure:
application-insights:
instrumentation-key: <my_instrumentation_key>
enabled: true
web:
enabled: true
logger:
level: info如果我在本地运行我的应用程序,这个配置可以很好地工作,并将日志推送到Azure AI。但当我把同样的推到Azure,我没有看到任何一个原木被推送。请帮帮我,因为过去三天我一直在胡思乱想。
发布于 2022-05-31 08:32:00
这个问题在将applicationinsights-agent.jar的版本更改为3.2.4后得到了解决。
https://stackoverflow.com/questions/72129473
复制相似问题