Skip to content

Commit bbe0f8b

Browse files
authored
fix: initialize custom metrics (#250)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 560000d commit bbe0f8b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/api/api.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ func Start(cfg *config.Config) error {
138138
// Add to global monitor object
139139
_ = ginmetrics.GetMonitor().AddMetric(failureMetric)
140140
_ = ginmetrics.GetMonitor().AddMetric(submittedMetric)
141+
// Initialize metrics
142+
_ = ginmetrics.GetMonitor().GetMetric("tx_submit_fail_count").SetGaugeValue(nil, 0.0)
143+
_ = ginmetrics.GetMonitor().GetMetric("tx_submit_count").SetGaugeValue(nil, 0.0)
141144

142145
// Start metrics listener
143146
go func() {

0 commit comments

Comments
 (0)