Skip to content

Commit

Permalink
fix: initialize custom metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
  • Loading branch information
wolf31o2 committed Oct 8, 2024
1 parent 560000d commit d127a10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ func Start(cfg *config.Config) error {
// Add to global monitor object
_ = ginmetrics.GetMonitor().AddMetric(failureMetric)
_ = ginmetrics.GetMonitor().AddMetric(submittedMetric)
// Initialize metrics
_ = ginmetrics.GetMonitor().GetMetric("tx_submit_fail_count").SetGaugeValue(nil, 0.0)
_ = ginmetrics.GetMonitor().GetMetric("tx_submit_count").SetGaugeValue(nil, 0.0)

// Start metrics listener
go func() {
Expand Down

0 comments on commit d127a10

Please sign in to comment.