Method AddChunkedUploadsCheck
AddChunkedUploadsCheck(IHealthChecksBuilder, string?, HealthStatus?, IEnumerable<string>?)
Adds a check of chunked uploads (see AddChunkedUploads<TSessionToken>(IServiceCollection, Action<ChunkedUploadOptions>?)) on this server: the upload store (see GetUsageAsync(CancellationToken)), the counts of the open uploads, the last cleanup and the handlers that run.
Declaration
public static IHealthChecksBuilder AddChunkedUploadsCheck(this IHealthChecksBuilder builder, string? name = null, HealthStatus? failureStatus = null, IEnumerable<string>? tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IHealthChecksBuilder | builder | The health checks builder. |
| string | name | The name of the check. Default is |
| HealthStatus? | failureStatus | The status that a failure reports. Default is Unhealthy. |
| IEnumerable<string> | tags | The tags of the check. Default is |
Returns
| Type | Description |
|---|---|
| IHealthChecksBuilder |
Remarks
It reports the failure status if the upload store can't be read, or the total length of the open uploads can't be read from the short-lived store, Degraded if the last cleanup failed, the open uploads have taken up MaxTotalSize, or the upload store has less space available than the open uploads can still take up under it, if it is set, or otherwise than the largest upload that the service accepts (the largest MaxSize of the mapped endpoints, with MaxSize for those without one), and Healthy otherwise. A store that can't tell its available space has no space rule. Its values are under the keys of HttpApiHealthCheckData.Uploads.
Each run reads the upload store's usage, which for the directory store is the space of its volume, and one counter of the short-lived store.