亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在 Spring Boot 應用程序中為 Azure 監控設置變量

如何在 Spring Boot 應用程序中為 Azure 監控設置變量

幕布斯6054654 2022-07-20 15:38:14
我在 Spring Boot 項目中設置 Azure 監控時遇到問題。我每次開始都有錯誤:instrumentationKey 必須設置為向 Azure Monitor 報告指標。我已經使用以下屬性設置了 application.properties:azure.application-insights.instrumentation-key=VALID-UUIDspring.application.name=test項目的依賴關系如下: <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-web</artifactId>        <version>2.1.3</version>    </dependency>    <dependency>        <groupId>com.microsoft.azure</groupId>        <artifactId>azure-spring-boot-metrics-starter</artifactId>        <version>2.1.4</version>    </dependency>
查看完整描述

2 回答

?
開滿天機

TA貢獻1786條經驗 獲得超13個贊

根據此https://docs.microsoft.com/en-us/azure/azure-monitor/app/micrometer-java#using-spring-2x文檔,您還需要添加 application-insights-springboot-starter。

否則,您可以將 key 設置為azuremonitor.instrumentationKey. 我的建議是添加 application-insights-springboot-starter 和 azure-spring-boot-metrics-starter


查看完整回答
反對 回復 2022-07-20
?
汪汪一只貓

TA貢獻1898條經驗 獲得超8個贊

按依賴跟蹤

您的錯誤消息來自AzureMonitorConfig

所以我認為關鍵是修改為

azuremonitor.instrumentationKey


查看完整回答
反對 回復 2022-07-20
  • 2 回答
  • 0 關注
  • 114 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號