Skip to content

Commit f98ebab

Browse files
committed
Document metrics interface
1 parent cd3d721 commit f98ebab

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

driver/sql/metrics.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ package sql
33
type (
44
// Metrics a structured metrics interface
55
Metrics interface {
6+
// ReceivedNotification sends the metric to keep count of notifications received by goengine
67
ReceivedNotification(isNotification bool)
8+
// QueueNotification is called when a notification is queued.
9+
// It saves start time for an event on aggregate when it's queued
710
QueueNotification(notification *ProjectionNotification)
11+
// StartNotificationProcessing is called when a notification processing is started
12+
// It saves start time for an event on aggregate when it's picked to be processed by background processor
813
StartNotificationProcessing(notification *ProjectionNotification)
14+
// FinishNotificationProcessing is called when a notification processing is finished
15+
// It actually sends metrics calculating duration for which a notification spends in queue and then processed by background processor
916
FinishNotificationProcessing(notification *ProjectionNotification, success bool)
1017
}
1118
)

0 commit comments

Comments
 (0)