Skip to content

feat(agent): Expose magicsock metrics #7183

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

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Apr 18, 2023

Related: #6724

This PR enables magicsock metrics from wgengine via the agent internal endpoint. They might be useful for investigating network connectivity issues.

I collected these metrics by randomly playing with ping, scaletest, reconnectingpty, and code-server.

$ curl -s localhost:2112 | grep -v " 0" | grep -v TYPE
magicsock_disco_recv_bad_peer 1
magicsock_disco_recv_callmemaybe 10
magicsock_disco_recv_derp 39
magicsock_disco_recv_ping 370
magicsock_disco_recv_pong 143
magicsock_disco_recv_udp 484
magicsock_disco_send_derp 32
magicsock_disco_send_udp 494
magicsock_disco_sent_callmemaybe 3
magicsock_disco_sent_derp 32
magicsock_disco_sent_ping 153
magicsock_disco_sent_pong 370
magicsock_disco_sent_udp 494
magicsock_netmap_num_peers 3
magicsock_num_derp_conns 1
magicsock_recv_data_derp 4
magicsock_recv_data_ipv4 4675
magicsock_restun_calls 12
magicsock_send_data 6025
magicsock_send_derp 34
magicsock_send_derp_queued 34
magicsock_send_udp 494
magicsock_update_endpoints 12
netcheck_report 11
netcheck_report_full 2
netcheck_stun_recv_ipv4 13
netcheck_stun_send_ipv4 13
portmap_pcp_sent 11
portmap_pmp_sent 11
portmap_upnp_sent 11
tstun_in_from_wg 4668
tstun_in_from_wg_drop 4668
tstun_out_to_wg 6018

@mtojek mtojek requested review from coadler and bpmct April 18, 2023 12:25
@mtojek mtojek self-assigned this Apr 18, 2023
@mtojek mtojek requested a review from johnstcn April 18, 2023 12:25
@mtojek mtojek marked this pull request as ready for review April 18, 2023 12:34
@mtojek mtojek merged commit f94ac55 into coder:main Apr 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants