-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add metric for num logs in buffer and missed logs (#11852)
* Add metric for num logs in buffer * Set metrics in buffer, remove ticker * Add missed logs metric * Remove logsInBuffer var * Add more metrics * Change to inc and dec
- Loading branch information
1 parent
8c01c7d
commit d19cb01
Showing
5 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/prommetrics/metrics.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package prommetrics | ||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/prometheus/client_golang/prometheus/promauto" | ||
) | ||
|
||
// AutomationNamespace is the namespace for all Automation related metrics | ||
const AutomationLogTriggerNamespace = "automation_log_trigger" | ||
|
||
// Automation metrics | ||
var ( | ||
AutomationLogsInLogBuffer = promauto.NewGauge(prometheus.GaugeOpts{ | ||
Namespace: AutomationLogTriggerNamespace, | ||
Name: "num_logs_in_log_buffer", | ||
Help: "The total number of logs currently being stored in the log buffer", | ||
}) | ||
AutomationRecovererMissedLogs = promauto.NewCounter(prometheus.CounterOpts{ | ||
Namespace: AutomationLogTriggerNamespace, | ||
Name: "num_recoverer_missed_logs", | ||
Help: "How many valid log triggers were identified as being missed by the recoverer", | ||
}) | ||
AutomationRecovererPendingPayloads = promauto.NewGauge(prometheus.GaugeOpts{ | ||
Namespace: AutomationLogTriggerNamespace, | ||
Name: "num_recoverer_pending_payloads", | ||
Help: "How many log trigger payloads are currently pending in the recoverer", | ||
}) | ||
AutomationActiveUpkeeps = promauto.NewGauge(prometheus.GaugeOpts{ | ||
Namespace: AutomationLogTriggerNamespace, | ||
Name: "num_active_upkeeps", | ||
Help: "How many log trigger upkeeps are currently active", | ||
}) | ||
AutomationLogProviderLatestBlock = promauto.NewGauge(prometheus.GaugeOpts{ | ||
Namespace: AutomationLogTriggerNamespace, | ||
Name: "log_provider_latest_block", | ||
Help: "The latest block number the log provider has seen", | ||
}) | ||
) |