Metrics on how many connections routed via TURN #1478

Open
opened 2025-11-20 05:31:23 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @BitPatty on GitHub (Dec 6, 2024).

Is your feature request related to a problem? Please describe.
There is currently no straightforward way to determine whether a connection to a node is routed via TURN, especially on mobile clients/apps. This lack of visibility can make troubleshooting and diagnosing network issues challenging.

Describe the solution you'd like
Add an option for the client to collect connection statistics, specifically whether TURN was used, along with key metrics such as Time/Duration and RX/TX bytes per connection. If TURN was used, it would also be helpful to log which TURN server was utilized.

Additionally, an option could be provided to share these statistics with the management server for centralized observability.

For privacy reasons, both options (local collection and sharing with the management server) should be strictly opt-in.

Basic example:

Connection Type: TURN
TURN Server: turn-eu1.example.com
Relayed Bytes: 150 MB RX / 120 MB TX
Connection Start: 2024-12-06T12:00:00Z
Connection End: 2024-12-06T17:00:00Z

Describe alternatives you've considered
The only other solution I'd see is an outside / third party traffic analyzer.

Additional context
This feature would assist in detecting potential configuration issues, provide troubleshooting insights for both consumers and Netbird developers and operators, and help optimize deployments by offering greater visibility into connection behavior.

Originally created by @BitPatty on GitHub (Dec 6, 2024). **Is your feature request related to a problem? Please describe.** There is currently no straightforward way to determine whether a connection to a node is routed via TURN, especially on mobile clients/apps. This lack of visibility can make troubleshooting and diagnosing network issues challenging. **Describe the solution you'd like** Add an option for the client to collect connection statistics, specifically whether TURN was used, along with key metrics such as Time/Duration and RX/TX bytes per connection. If TURN was used, it would also be helpful to log which TURN server was utilized. Additionally, an option could be provided to share these statistics with the management server for centralized observability. For privacy reasons, both options (local collection and sharing with the management server) should be strictly opt-in. Basic example: ``` Connection Type: TURN TURN Server: turn-eu1.example.com Relayed Bytes: 150 MB RX / 120 MB TX Connection Start: 2024-12-06T12:00:00Z Connection End: 2024-12-06T17:00:00Z ``` **Describe alternatives you've considered** The only other solution I'd see is an outside / third party traffic analyzer. **Additional context** This feature would assist in detecting potential configuration issues, provide troubleshooting insights for both consumers and Netbird developers and operators, and help optimize deployments by offering greater visibility into connection behavior.
saavagebueno added the feature-request label 2025-11-20 05:31:23 -05:00
Author
Owner

@Gauss23 commented on GitHub (Jan 29, 2025):

+1. The agent on the peer could probably collect and send those metrics to the management server. As well as a list of peers connected to this peer and the information how this connection is established.

@Gauss23 commented on GitHub (Jan 29, 2025): +1. The agent on the peer could probably collect and send those metrics to the management server. As well as a list of peers connected to this peer and the information how this connection is established.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1478