Table of Contents

Class DiskSpaceHealthCheck

Namespace
JD.AI.Telemetry.HealthChecks
Assembly
JD.AI.Telemetry.dll

Health check that verifies sufficient disk space is available in the JD.AI data directory. Reports Degraded when free space drops below the configured threshold (default: 100 MB).

public sealed class DiskSpaceHealthCheck : IHealthCheck
Inheritance
DiskSpaceHealthCheck
Implements
Inherited Members

Constructors

DiskSpaceHealthCheck(string, int)

public DiskSpaceHealthCheck(string directory, int minimumFreeMegabytes = 100)

Parameters

directory string

Directory to check (typically the JD.AI data root).

minimumFreeMegabytes int

Minimum free space in MB before reporting Degraded.

Methods

CheckHealthAsync(HealthCheckContext, CancellationToken)

Runs the health check, returning the status of the component being checked.

public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)

Parameters

context HealthCheckContext

A context object associated with the current execution.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the health check.

Returns

Task<HealthCheckResult>

A Task<TResult> that completes when the health check has finished, yielding the status of the component being checked.