-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
prometheus.go
153 lines (151 loc) · 7.32 KB
/
prometheus.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
package relayer
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
BlocksScanned = promauto.NewCounter(prometheus.CounterOpts{
Name: "blocks_scanned_ops_total",
Help: "The total number of blocks scanned",
})
QueueMessageAcknowledged = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_message_acknowledged_ops_total",
Help: "The total number of acknowledged queue events",
})
QueueMessageNegativelyAcknowledged = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_message_negatively_acknowledged_ops_total",
Help: "The total number of negatively acknowledged queue events",
})
QueueChannelNotifyClosed = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_channel_notify_closed_ops_total",
Help: "The total number of times a queue channel was notified as closed",
})
QueueConnectionNotifyClosed = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_connection_notify_closed_ops_total",
Help: "The total number of times a queue connection was notified as closed",
})
QueueMessagePublished = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_message_published_ops_total",
Help: "The total number of times a queue message was published",
})
QueueMessagePublishedErrors = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_message_published_errors_ops_total",
Help: "The total number of times a queue message was published with an error",
})
QueueConnectionInstantiated = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_connection_instantiated_ops_total",
Help: "The total number of times a queue connection was instantiated",
})
QueueConnectionInstantiatedErrors = promauto.NewCounter(prometheus.CounterOpts{
Name: "queue_connection_instantiated_errors_ops_total",
Help: "The total number of times a queue connection was instantiated with an error",
})
ChainDataSyncedEventsIndexed = promauto.NewCounter(prometheus.CounterOpts{
Name: "chain_data_synced_events_indexed_ops_total",
Help: "The total number of ChainDataSynced indexed events",
})
MessageSentEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_sent_events_processed_ops_total",
Help: "The total number of MessageSent processed events",
})
MessageSentEventsProcessedReverted = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_sent_events_processed_reverted_ops_total",
Help: "The total number of MessageSent processed events that reverted",
})
MessageSentEventsIndexed = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_sent_events_indexed_ops_total",
Help: "The total number of MessageSent indexed events",
})
MessageSentEventsIndexingErrors = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_sent_events_indexing_errors_ops_total",
Help: "The total number of errors indexing MessageSent events",
})
MessageSentEventsRetries = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_sent_events_retries_ops_total",
Help: "The total number of MessageSent events retries",
})
MessageSentEventsMaxRetriesReached = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_sent_events_max_retries_reached_ops_total",
Help: "The total number of MessageSent events that reached max retries",
})
MessageProcessedEventsIndexingErrors = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_processed_events_indexing_errors_ops_total",
Help: "The total number of errors indexing MessageProcessed events",
})
MessageStatusChangedEventsIndexed = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_status_changed_events_indexed_ops_total",
Help: "The total number of MessageStatusChanged indexed events",
})
MessageStatusChangedEventsIndexingErrors = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_status_changed_events_indexing_errors_ops_total",
Help: "The total number of errors indexing MessageStatusChanged events",
})
ChainDataSyncedEventsIndexingErrors = promauto.NewCounter(prometheus.CounterOpts{
Name: "chain_data_synced_events_indexing_errors_ops_total",
Help: "The total number of errors indexing ChainDataSynced events",
})
UnprofitableMessagesDetected = promauto.NewCounter(prometheus.CounterOpts{
Name: "unprofitable_messages_detected",
Help: "The total number of messages deemed unprofitable",
})
BlocksProcessed = promauto.NewCounter(prometheus.CounterOpts{
Name: "blocks_processed_ops_total",
Help: "The total number of processed blocks",
})
BridgeMessageNotSent = promauto.NewCounter(prometheus.CounterOpts{
Name: "bridge_message_not_sent_opt_total",
Help: "The total number of times a bridge message has not been sent but has been processed",
})
BridgePaused = promauto.NewCounter(prometheus.CounterOpts{
Name: "bridge_paused_ops_total",
Help: "The total number of times the bridge has been paused",
})
BridgePausedErrors = promauto.NewCounter(prometheus.CounterOpts{
Name: "bridge_paused_errors_ops_total",
Help: "The total number of times the bridge has encountered an error while attempting to have been paused",
})
RetriableEvents = promauto.NewCounter(prometheus.CounterOpts{
Name: "events_processed_retriable_status_ops_total",
Help: "The total number of processed events that ended up in Retriable status",
})
DoneEvents = promauto.NewCounter(prometheus.CounterOpts{
Name: "events_processed_done_status_ops_total",
Help: "The total number of processed events that ended up in Done status",
})
ErrorEvents = promauto.NewCounter(prometheus.CounterOpts{
Name: "events_processed_error_ops_total",
Help: "The total number of processed events that failed due to an error",
})
MessagesNotReceivedOnDestChain = promauto.NewCounter(prometheus.CounterOpts{
Name: "messages_not_received_on_dest_chain_opts_total",
Help: "The total number of messages that were not received on the destination chain",
})
ProfitableMessageAfterTransacting = promauto.NewCounter(prometheus.CounterOpts{
Name: "profitable_message_after_transacting_ops_total",
Help: "The total number of processed events that ended up profitable",
})
UnprofitableMessageAfterTransacting = promauto.NewCounter(prometheus.CounterOpts{
Name: "unprofitable_message_after_transacting_ops_total",
Help: "The total number of processed events that ended up unprofitable",
})
MessageSentEventsAfterRetryErrorCount = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_sent_events_after_retry_error_count",
Help: "The total number of errors logged for MessageSent events after retries",
})
MessageStatusChangedEventsAfterRetryErrorCount = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_status_changed_events_after_retry_error_count",
Help: "The total number of errors logged for MessageStatusChanged events after retries",
})
ChainDataSyncedEventsAfterRetryErrorCount = promauto.NewCounter(prometheus.CounterOpts{
Name: "chain_data_synced_events_after_retry_error_count",
Help: "The total number of errors logged for ChainDataSynced events after retries",
})
MessageProcessedEventsAfterRetryErrorCount = promauto.NewCounter(prometheus.CounterOpts{
Name: "message_processed_events_after_retry_error_count",
Help: "The total number of errors logged for MessageProcessed events after retries",
})
RelayerKeyBalanceGauge = promauto.NewGauge(prometheus.GaugeOpts{
Name: "relayer_key_balance",
Help: "Current balance of the relayer key",
})
)