-
Notifications
You must be signed in to change notification settings - Fork 2k
/
IQueueAdapterReceiverMonitor.cs
42 lines (39 loc) · 1.95 KB
/
IQueueAdapterReceiverMonitor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
namespace Orleans.Providers.Streams.Common
{
/// <summary>
/// Responsible for monitoring receiver performance metrics.
/// </summary>
public interface IQueueAdapterReceiverMonitor
{
/// <summary>
/// Track attempts to initialize the receiver.
/// </summary>
/// <param name="success">True if read succeeded, false if read failed.</param>
/// <param name="callTime">Init operation time</param>
/// <param name="exception">Exception caught if initialize fail</param>
void TrackInitialization(bool success, TimeSpan callTime, Exception exception);
/// <summary>
/// Track attempts to read from the partition. Tracked per partition read operation.
/// </summary>
/// <param name="success">True if read succeeded, false if read failed.</param>
/// <param name="callTime">Time spent in read operation.</param>
/// <param name="exception">The exception caught if read failed.</param>
void TrackRead(bool success, TimeSpan callTime, Exception exception);
/// <summary>
/// Tracks messages read and time taken per successful read. Tracked per successful partition read operation.
/// </summary>
/// <param name="count">Messages read.</param>
/// <param name="oldestMessageEnqueueTimeUtc"></param>
/// <param name="newestMessageEnqueueTimeUtc"></param>
void TrackMessagesReceived(long count, DateTime? oldestMessageEnqueueTimeUtc, DateTime? newestMessageEnqueueTimeUtc);
/// <summary>
/// Track attempts to shutdown the receiver.
/// </summary>
/// <param name="success">True if read succeeded, false if read failed.</param>
/// <param name="callTime">Shutdown operation time</param>
/// <param name="exception">Exception caught if shutdown fail</param>
void TrackShutdown(bool success, TimeSpan callTime, Exception exception);
}
}