Skip to content

Commit

Permalink
chore: rename metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
vgonkivs committed Dec 15, 2023
1 parent f4bd812 commit 946fd44
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sync/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,47 @@ type metrics struct {

func newMetrics(headersThreshold time.Duration) (*metrics, error) {
totalSynced, err := meter.Float64ObservableGauge(
"total_synced_headers",
"hdr_total_synced_headers",
metric.WithDescription("total synced headers"),
)
if err != nil {
return nil, err
}

syncLoopStarted, err := meter.Int64Counter(
"sync_loop_started",
"hdr_sync_loop_started",
metric.WithDescription("sync loop started"),
)
if err != nil {
return nil, err
}

trustedPeersOutOfSync, err := meter.Int64Counter(
"tr_peers_out_of_sync",
"hdr_tr_peers_out_of_sync",
metric.WithDescription("trusted peers out of sync"),
)
if err != nil {
return nil, err
}

laggingHeadersStart, err := meter.Int64Counter(
"sync_lagging_hdr_start",
"hdr_sync_lagging_hdr_start",
metric.WithDescription("lagging header start"),
)
if err != nil {
return nil, err
}

subjectiveHead, err := meter.Int64ObservableGauge(
"sync_subjective_head",
"hdr_sync_subjective_head",
metric.WithDescription("subjective head height"),
)
if err != nil {
return nil, err
}

blockTime, err := meter.Float64Histogram(
"sync_actual_blockTime_ts",
"hdr_sync_actual_blockTime_ts",
metric.WithDescription("duration between creation of 2 blocks"),
)
if err != nil {
Expand Down

0 comments on commit 946fd44

Please sign in to comment.