celestiaorg / go-header

Go library with all the services needed to request, sync and store blockchain headers.
Apache License 2.0
17 stars 16 forks source link

fix!: handle error on metrics #123

Closed Wondertan closed 8 months ago

Wondertan commented 8 months ago

I treated metrics initialization as like it's being run in init while it's not. Even if these are programmer bug errors, metrics initialization will happen after some other components have started, causing various artifacts if not stopped gracefully.

codecov-commenter commented 8 months ago

Codecov Report

Merging #123 (4716bc9) into main (27e85f9) will decrease coverage by 0.17%. The diff coverage is 10.00%.

@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
- Coverage   69.43%   69.27%   -0.17%     
==========================================
  Files          37       37              
  Lines        2971     2981      +10     
==========================================
+ Hits         2063     2065       +2     
- Misses        761      769       +8     
  Partials      147      147              
Files Coverage Δ
p2p/subscriber.go 48.52% <100.00%> (ø)
p2p/metrics.go 13.79% <0.00%> (-1.03%) :arrow_down:
sync/metrics.go 15.38% <0.00%> (-1.29%) :arrow_down:
p2p/exchange.go 85.65% <0.00%> (-1.14%) :arrow_down:
sync/sync.go 71.19% <0.00%> (-1.19%) :arrow_down:

... and 1 file with indirect coverage changes