Interface IEndpointStatistics
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; }
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; }
LastRefusalMessage
Why the last request was refused, or empty string.
string LastRefusalMessage { 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; }
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; }
ThroughputPerSecond
Messages per second over a 60-second sliding window.
double ThroughputPerSecond { 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(Exception)
Record a processing error with exception details. Thread-safe.
void RecordError(Exception exception)
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(string)
Record a processing warning with message. Thread-safe.
void RecordWarning(string message)