Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 770 forks source link

Increase in Azure Storage costs after upgrading AspNetCore.HealthChecks.AzureStorage to a newer version #2221

Open stephen-sherman opened 1 month ago

stephen-sherman commented 1 month ago

What happened:

Noted an ~8x increase in "LRS List and Create Container Operations" and daily Azure Storage costs after upgrading AspNetCore.HealthChecks.AzureStorage to a newer version in a .NET 8 Umbraco.Cms 13 solution. Rolling back returns this to its previous rate.

What you expected to happen:

Daily Azure Storage costs to remain inline with those prior to upgrade.

How to reproduce it (as minimally and precisely as possible):

Source code sample:

Using AspNetCore.HealthChecks.AzureStorage:

public void ConfigureServices(IServiceCollection services)
{
    services
        .AddHealthChecks()
        .AddAzureBlobStorage(
            connectionString: _config["Umbraco:Storage:AzureBlob:Media:ConnectionString"],
            failureStatus: HealthStatus.Unhealthy);

Using AspNetCore.HealthChecks.Azure.Storage.Blobs:

public void ConfigureServices(IServiceCollection services)
        {
            services.AddSingleton(serviceProvider => new BlobServiceClient(_config["Umbraco:Storage:AzureBlob:Media:ConnectionString"]));

            services
                .AddHealthChecks()
                .AddAzureBlobStorage(
                    connectionString: _config["Umbraco:Storage:AzureBlob:Media:ConnectionString"],
                    failureStatus: HealthStatus.Unhealthy);

Anything else we need to know?:

Primarily looking to understand what changes between these versions could have this effect, and how to mitigate it.

Environment: