我在 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>
如何在 Spring Boot 應用程序中為 Azure 監控設置變量
幕布斯6054654
2022-07-20 15:38:14