App Configuration、Event Hubs、Azure Cosmos DB、Key Vault、ストレージ BLOB、ストレージ キュー、ストレージ ファイルの正常性インジケーターと、すべての HTTP ベースの Azure SDK に対する Spring Cloud Sleuth サポートが追加されました。 たとえば、Spring Boot アクチュエータ エンドポイントを介してストレージ BLOB が上下しているかどうかを判断したり、アプリケーションから Key Vault への依存関係や待機時間を追跡したりできるようになりました。
正常性インジケーターを有効にする
正常性インジケーターを有効にするには、Spring Cloud Azure Actuator Starter 依存関係を pom.xml ファイルに追加します。 この依存関係には、spring-boot-starter-actuatorも含まれます。
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-starter-actuator</artifactId>
</dependency>
次の表に、各 Azure サービスの正常性インジケーターを有効または無効にする構成可能なプロパティを示します。
| Azure サービス | 財産 |
|---|---|
| App Configuration | management.health.azure-appconfiguration.enabled |
| Azure Cosmos DB | management.health.azure-cosmos.enabled |
| Event Hubs | management.health.azure-eventhubs.enabled |
| Key Vault 証明書 | management.health.azure-keyvault-certificate.enabled |
| Key Vault シークレット | management.health.azure-keyvault-secret.enabled |
| ストレージ BLOB | management.health.azure-storage-blob.enabled |
| ストレージ ファイル共有 | management.health.azure-storage-fileshare.enabled |
| ストレージ キュー | management.health.azure-storage-queue.enabled |
重要
Azure サービスの正常性エンドポイントを呼び出すと、追加料金が発生する可能性があります。 たとえば、http://HOST_NAME:{port}/actuator/health/cosmos を呼び出して Azure Cosmos DB の正常性情報を取得すると、要求ユニット (RU) が計算されます。 詳細については、Request Units in Azure Cosmos DB を参照してください。
手記
Cosmosの正常性エンドポイントを呼び出す場合は、オプション spring.cloud.azure.cosmos.database を構成する必要があります。それ以外の場合は、unknown の正常性状態が返されます。
Storage Queueの正常性エンドポイントを呼び出す場合、承認に Storage Account Contributor を使用する場合は、Azure AD のロールが必要です。
Sleuth を有効にする
Spring Cloud Sleuth を使用して Azure SDK アクティビティをトレースする場合は、次の Spring Cloud Azure Trace Sleuth 依存関係を pom.xml ファイルに追加します。
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-trace-sleuth</artifactId>
</dependency>
手記
現在サポートされているのは、HTTP ベースの Azure SDK クライアントのみです。 たとえば、AMQP トランスポートを含む Event Hubs と Service Bus は現在サポートされていません。 これらの要件については、Azure アプリケーション Insightを使用することをお勧めします。