Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't create libp2p metrics twice [fixes NET-348] #1545

Merged
merged 3 commits into from
Mar 31, 2023
Merged

Conversation

kmd-fl
Copy link
Contributor

@kmd-fl kmd-fl commented Mar 31, 2023

Using only Arc without Mutex is okay, since the metrics are atomic/mutexed inside themselves.

@kmd-fl kmd-fl requested review from gurinderu, folex and justprosh March 31, 2023 10:57
@kmd-fl kmd-fl changed the title fix: don't create libp2p metrics twice fix: don't create libp2p metrics twice [fixes NET-348] Mar 31, 2023
@linear
Copy link

linear bot commented Mar 31, 2023

NET-348 rust-peer libp2p metrics duplicated

docker run --rm -p 7777:7777 -p 18080:18080 fluencelabs/rust-peer:0.1.8 --local

Trigger metric increase

curl localhost:7777

Check metrics

curl -Ss localhost:18080/metrics | grep connections_incoming_total

Result is

libp2p_swarm_connections_incoming_total 0
libp2p_swarm_connections_incoming_total 1

Not critical, as correct metric comes last and monitoring database discards the double. But still better to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants