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(p2p): fix metrics in p2p package #144

Closed vgonkivs closed 5 months ago

vgonkivs commented 5 months ago

Overview

Previously some metrics did not work in the p2p package because Otel does not allow registering multiple callbacks per otel.Meter instance. At some point tracked/disconnected/blocked metrics were overwritten by subscription metric callback. Added single metric.Registration in exchange client and created a separate instance for subscriber metrics.

Checklist

codecov-commenter commented 5 months ago

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (28ff21c) 63.60% compared to head (2d1debb) 64.11%. Report is 10 commits behind head on main.

Files Patch % Lines
p2p/exchange_metrics.go 0.00% 12 Missing :warning:
p2p/subscriber_metrics.go 0.00% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #144 +/- ## ========================================== + Coverage 63.60% 64.11% +0.50% ========================================== Files 39 39 Lines 3366 3380 +14 ========================================== + Hits 2141 2167 +26 + Misses 1060 1048 -12 Partials 165 165 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.