Table of Contents

Class TransportHealthMetrics

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.Abstractions.dll

Metrics for transport health monitoring.

public sealed class TransportHealthMetrics
Inheritance
TransportHealthMetrics
Inherited Members
Extension Methods

Constructors

TransportHealthMetrics(DateTimeOffset, TransportHealthStatus, int, long, double, TimeSpan, IReadOnlyDictionary<string, object>?)

Initializes a new instance of the TransportHealthMetrics class.

public TransportHealthMetrics(DateTimeOffset lastCheckTimestamp, TransportHealthStatus lastStatus, int consecutiveFailures, long totalChecks, double successRate, TimeSpan averageCheckDuration, IReadOnlyDictionary<string, object>? customMetrics = null)

Parameters

lastCheckTimestamp DateTimeOffset

Timestamp of the last health check.

lastStatus TransportHealthStatus

The last health status.

consecutiveFailures int

Number of consecutive failures.

totalChecks long

Total number of health checks performed.

successRate double

Success rate of health checks (0.0 to 1.0).

averageCheckDuration TimeSpan

Average duration of health checks.

customMetrics IReadOnlyDictionary<string, object>

Custom metrics dictionary.

Properties

AverageCheckDuration

Gets the average duration of health checks.

public TimeSpan AverageCheckDuration { get; }

Property Value

TimeSpan

ConsecutiveFailures

Gets the number of consecutive failures.

public int ConsecutiveFailures { get; }

Property Value

int

CustomMetrics

Gets custom metrics.

public IReadOnlyDictionary<string, object> CustomMetrics { get; }

Property Value

IReadOnlyDictionary<string, object>

IsHealthy

Gets a value indicating whether the component is healthy.

public bool IsHealthy { get; }

Property Value

bool

IsStable

Gets a value indicating whether the component is stable (no recent failures and high success rate).

public bool IsStable { get; }

Property Value

bool

LastCheckTimestamp

Gets the timestamp of the last health check.

public DateTimeOffset LastCheckTimestamp { get; }

Property Value

DateTimeOffset

LastStatus

Gets the last health status.

public TransportHealthStatus LastStatus { get; }

Property Value

TransportHealthStatus

SuccessRate

Gets the success rate of health checks (0.0 to 1.0).

public double SuccessRate { get; }

Property Value

double

TotalChecks

Gets the total number of health checks performed.

public long TotalChecks { get; }

Property Value

long