Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
vgonkivs committed Feb 1, 2024
1 parent 167e306 commit 3e7e45e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sync/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ func (m *metrics) subjectiveInitialization(ctx context.Context) {
}

func (m *metrics) getRangeRequestTime(ctx context.Context, duration time.Duration, amount int, failed bool) {
m.requestRangeTimeHist.Record(ctx, duration.Seconds(),
metric.WithAttributes(
attribute.Int("headers amount", amount),
attribute.Bool("request failed", failed),
))
m.observe(ctx, func(ctx context.Context) {
m.requestRangeTimeHist.Record(ctx, duration.Seconds(),
metric.WithAttributes(
attribute.Int("headers amount", amount),
attribute.Bool("request failed", failed),
))
})
}

func (m *metrics) newSubjectiveHead(ctx context.Context, height uint64, timestamp time.Time) {
Expand Down

0 comments on commit 3e7e45e

Please sign in to comment.