Interface ICarrotMetricsRecorder
Interface for recording metrics related to CarrotMQ processing, such as request duration and message delivery status.
public interface ICarrotMetricsRecorder : IDisposable
- Inherited Members
Methods
EndConsuming(long, DeliveryStatus)
Records the metrics of the end of message consuming. Captures the duration and delivery status.
void EndConsuming(long timestamp, DeliveryStatus deliveryStatus)
Parameters
timestamplongThe timestamp when the incoming message was received (in ticks or UnixTimeMilliseconds depending on the current .NET version).
deliveryStatusDeliveryStatusThe status of the message delivery.
RecordMessageType(string)
Records the metric to count messages based on calledMethod
void RecordMessageType(string calledMethod)
Parameters
calledMethodstring
ResponsePublished(string, int)
Record metric for response publishing (CalledMethod and StatusCode)
void ResponsePublished(string calledMethod, int statusCode)
Parameters
calledMethodstringCalledMethod of the response message (Response:RequestCalledMethod)
statusCodeintStatus code of the response
StartConsuming()
Records the metrics for the start of message consuming.
long StartConsuming()
Returns
- long
The current timestamp when the message is received (in ticks or UnixTimeMilliseconds depending on the current .NET version).