This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
/
processor_metrics.go
32 lines (29 loc) · 1.67 KB
/
processor_metrics.go
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
package implementations
import (
"github.com/flyteorg/flytestdlib/promutils"
"github.com/prometheus/client_golang/prometheus"
)
type processorSystemMetrics struct {
Scope promutils.Scope
MessageTotal prometheus.Counter
MessageDoneError prometheus.Counter
MessageDecodingError prometheus.Counter
MessageDataError prometheus.Counter
MessageProcessorError prometheus.Counter
MessageSuccess prometheus.Counter
ChannelClosedError prometheus.Counter
StopError prometheus.Counter
}
func newProcessorSystemMetrics(scope promutils.Scope) processorSystemMetrics {
return processorSystemMetrics{
Scope: scope,
MessageTotal: scope.MustNewCounter("message_total", "overall count of messages processed"),
MessageDecodingError: scope.MustNewCounter("message_decoding_error", "count of messages with decoding errors"),
MessageDataError: scope.MustNewCounter("message_data_error", "count of message data processing errors experience when preparing the message to be notified."),
MessageDoneError: scope.MustNewCounter("message_done_error", "count of message errors when marking it as done with underlying processor"),
MessageProcessorError: scope.MustNewCounter("message_processing_error", "count of errors when interacting with notification processor"),
MessageSuccess: scope.MustNewCounter("message_ok", "count of messages successfully processed by underlying notification mechanism"),
ChannelClosedError: scope.MustNewCounter("channel_closed_error", "count of channel closing errors"),
StopError: scope.MustNewCounter("stop_error", "count of errors in Stop() method"),
}
}