Skip to content

Commit 16f3e89

Browse files
Merge pull request #304057 from zhiyuanliang-ms/zhiyuanliang/dotnet-provider-health-check
Azure App Configuration - Add health check doc
2 parents 095d9b1 + b532945 commit 16f3e89

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

articles/azure-app-configuration/configuration-provider-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Replica Failover | [GA](./reference-dotnet-provider.md#geo-replication) | GA | G
6969
Replica Load Balancing | [GA](./reference-dotnet-provider.md#geo-replication) | WIP | GA | GA | [GA](./reference-javascript-provider.md#geo-replication) | WIP
7070
Snapshots | [GA](./reference-dotnet-provider.md#snapshot) | GA | GA | WIP | [GA](./reference-javascript-provider.md#snapshot) | WIP
7171
Distributed Tracing | [GA](./reference-dotnet-provider.md#distributed-tracing) | WIP | WIP | WIP | WIP | WIP
72-
Health Check | WIP | GA | WIP | WIP | WIP | WIP
72+
Health Check | [GA](./reference-dotnet-provider.md#health-check) | WIP | WIP | WIP | WIP | WIP
7373
Select by Tag Filters | [GA](./reference-dotnet-provider.md#load-specific-key-values-using-selectors) | WIP | WIP | GA | WIP | WIP
7474

7575
## Support policy

articles/azure-app-configuration/reference-dotnet-provider.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,22 @@ builder.Services.AddOpenTelemetry()
673673

674674
For more information about OpenTelemetry in .NET, see the [OpenTelemetry .NET documentation](https://github.com/open-telemetry/opentelemetry-dotnet).
675675

676+
## Health check
677+
678+
The Azure App Configuration .NET provider supports [.NET app health checks](/dotnet/core/diagnostics/diagnostic-health-checks). To enable health checks, you can call `AddAzureAppConfiguration()` method on `IHealthChecksBuilder`, which will add an `IHealthCheck` with a default registration name of `"Microsoft.Extensions.Configuration.AzureAppConfiguration"`.
679+
680+
```C#
681+
builder.Configuration.AddAzureAppConfiguration(options =>
682+
options.Connect(new Uri(appConfigEndpoint), new DefaultAzureCredential()));
683+
684+
builder.Services.AddHealthChecks()
685+
.AddAzureAppConfiguration();
686+
```
687+
688+
The .NET provider will be considered as unhealthy when the last load or refresh attempt failed.
689+
690+
For more information about health checks in .NET, see the [.NET health monitoring documentation](/dotnet/architecture/microservices/implement-resilient-applications/monitor-app-health).
691+
676692
## Next steps
677693

678694
To learn how to use the .NET configuration provider, continue to the following tutorial.

0 commit comments

Comments
 (0)