Interface IEndpointStatistics

Assembly: redb.Route.dll

Optional statistics interface for endpoints that track message counts.
Not part of — consumers/services check via endpoint is IEndpointStatistics stats.
Counters use for thread safety.

public interface IEndpointStatistics

Properties

AverageProcessingTime

Average processing time over the last 100 messages.

TimeSpan AverageProcessingTime { get; }

BytesIn

Bytes that entered the endpoint (estimated from message bodies): what a consumer received,

long BytesIn { get; }

BytesOut

Bytes that left the endpoint: what a producer sent, and what a consumer wrote back as a

long BytesOut { get; }

Cancelled

Exchanges abandoned by a cooperative cancellation: the caller's token was cancelled while

long Cancelled { get; }

Errors

Number of errors during processing.

long Errors { get; }

HealthReason

Human-readable reason for the current health status.

string HealthReason { get; }

HealthStatus

Health status computed from error rate and activity.

EndpointHealthStatus HealthStatus { get; }

LastActivity

Timestamp of the last message activity (in or out), or null if no activity yet.

DateTime? LastActivity { get; }

LastErrorMessage

Message text of the last error, or empty string.

string LastErrorMessage { get; }

LastErrorTime

Timestamp of the last error, or null if no errors.

DateTime? LastErrorTime { get; }

LastRefusalMessage

Why the last request was refused, or empty string.

string LastRefusalMessage { get; }

LastRefusalTime

Timestamp of the last refusal, or null if none.

DateTime? LastRefusalTime { get; }

LastWarningMessage

Message text of the last warning, or empty string.

string LastWarningMessage { get; }

LastWarningTime

Timestamp of the last warning, or null if no warnings.

DateTime? LastWarningTime { get; }

MessagesIn

Number of messages received (consumed) by this endpoint.

long MessagesIn { get; }

MessagesOut

Number of messages sent (produced) by this endpoint.

long MessagesOut { get; }

Reconnects

Connections or links of this endpoint that were lost while a route ran and came back, as its connection supervisors

long Reconnects { get; }

Refused

Requests the transport refused as the caller's fault and answered with the protocol's own error: malformed or

long Refused { get; }

Rejected

Requests shed by an admission limit (e.g. maxConcurrentRequests) BEFORE a pipeline

long Rejected { get; }

StartTime

Timestamp when the endpoint started tracking statistics.

DateTime StartTime { get; }

ThroughputPerSecond

Messages per second over a 60-second sliding window.

double ThroughputPerSecond { get; }

Uptime

Duration the endpoint has been tracking statistics.

TimeSpan Uptime { get; }

Warnings

Number of warnings during processing.

long Warnings { get; }

Methods

RecordBytesIn(long)

Record incoming bytes (message body size). Thread-safe.

void RecordBytesIn(long bytes)

RecordBytesOut(long)

Record outgoing bytes (message body size). Thread-safe.

void RecordBytesOut(long bytes)

RecordCancelled()

Record an exchange abandoned by a cooperative cancellation. Thread-safe.

void RecordCancelled()

RecordError()

Record a processing error. Thread-safe.

void RecordError()

RecordError(Exception)

Record a processing error with exception details. Thread-safe.

void RecordError(Exception exception)

RecordMessageIn()

Record an incoming message (consumed). Thread-safe.

void RecordMessageIn()

RecordMessageOut()

Record an outgoing message (produced). Thread-safe.

void RecordMessageOut()

RecordProcessingTime(TimeSpan)

Record processing time of a single message. Thread-safe.

void RecordProcessingTime(TimeSpan duration)

RecordRefused(string)

Record a request refused as the caller's fault, with the reason (see ). Thread-safe.

void RecordRefused(string reason)

RecordRejected()

Record a request shed by an admission limit before the pipeline ran. Thread-safe.

void RecordRejected()

RecordWarning()

Record a processing warning. Thread-safe.

void RecordWarning()

RecordWarning(string)

Record a processing warning with message. Thread-safe.

void RecordWarning(string message)

ResetStatistics()

Resets all counters to zero.

void ResetStatistics()