Skip to content

Conversation

@gammazero
Copy link
Contributor

@gammazero gammazero commented Nov 19, 2024

Fixes invalid metrics errors logged by kubo at daemon startup.

Fixes the problem from ipfs/kubo#10567 (review)

@codecov
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.40%. Comparing base (e38f236) to head (f9be5c8).
Report is 2 commits behind head on main.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #723      +/-   ##
==========================================
- Coverage   60.43%   60.40%   -0.04%     
==========================================
  Files         243      243              
  Lines       31056    31057       +1     
==========================================
- Hits        18770    18759      -11     
- Misses      10624    10633       +9     
- Partials     1662     1665       +3     
Files with missing lines Coverage Δ
bitswap/server/internal/decision/engine.go 91.48% <100.00%> (ø)
bitswap/server/server.go 61.65% <100.00%> (-0.81%) ⬇️

... and 8 files with indirect coverage changes


🚨 Try these New Features:

@lidel lidel changed the title pass context to server engine to register metrics fix(bitswap/server): pass context to server engine to register metrics Nov 19, 2024
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think this is good enough fix problem at hand (metrics regression due to goprocess cleanup that landed with #710).

In future we may want to rework the way bitswap metrics are gathered, but that would be a separate PR (while working on #722 i've identified few places where we do different things, eg. boxo/gateway only uses default registry and ignores duplicate registration errors)

@lidel lidel merged commit 5929aca into main Nov 19, 2024
@lidel lidel deleted the fix/register-metrics branch November 19, 2024 15:33
@gammazero gammazero restored the fix/register-metrics branch November 19, 2024 16:07
@gammazero gammazero deleted the fix/register-metrics branch November 19, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants