Skip to content

Conversation

@simonwicky
Copy link
Contributor

@simonwicky simonwicky commented Nov 25, 2025

Ticket

JIRA-NET-422

Description

This PR improves on the minimalistic statistics collection that already exists :

  • CLI control to enable/disable collection
  • CLI control to allow direct sending (not via the tunnel)
  • CLI control over the seed for the stats ID, and it gets persisted
  • Enabling/disabling collection doesn't require a daemon reboot
  • Sessions data is more more comprehensive and accurate
  • Sending strategy involves retries
    This PR requires Statistics API v2 nym#6227 to be merged in the core first, and a Cargo.lock update then

Side note

App toggle and tooltip might need to be updated. iOS still needs to have disabled stats

Checklist:

  • Changelog

Screenshots (optional, if UI related)


This change is Reviewable

Copy link
Contributor

@trojanfoe trojanfoe left a comment

Choose a reason for hiding this comment

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

I have an upcoming change with a new v3 configuration in review at the moment (https://github.com/nymtech/nym-vpn-client/pull/4015/files). This includes a restructure of the service config into multiple modules. Can you please wait until that is merged before merging this change?

@simonwicky
Copy link
Contributor Author

Monorepo PR was merged, Cargo.lock updated.
We're waiting for #4015 to be merged to avoid merge conflicts and for an update of the config following this.
cc @trojanfoe

Copy link
Contributor

@trojanfoe trojanfoe left a comment

Choose a reason for hiding this comment

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

Blocking PR has now been merged. Please rebase on develop.

@simonwicky simonwicky force-pushed the simon/stats-collection-v2 branch from 92b224e to 526eb4b Compare November 26, 2025 08:09
@simonwicky simonwicky force-pushed the simon/stats-collection-v2 branch from 526eb4b to ca06423 Compare December 1, 2025 09:01
Copy link
Collaborator

@pronebird pronebird left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 47 files reviewed, 2 unresolved discussions (waiting on @agentpietrucha, @doums, @mrkiwi, @neacsu, @rokas-ambrazevicius, @simonwicky, and @trojanfoe)


nym-vpn-core/crates/nym-vpnd/src/service/config/v3.rs line 72 at r2 (raw file):

            residential_exit: value.residential_exit,
            custom_dns,
            network_stats: value.network_stats,

Don't you need to convert it from persistent representation? cc @trojanfoe

Copy link
Collaborator

@pronebird pronebird left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 47 files reviewed, 3 unresolved discussions (waiting on @agentpietrucha, @doums, @mrkiwi, @neacsu, @rokas-ambrazevicius, @simonwicky, and @trojanfoe)


nym-vpn-core/crates/nym-vpnd/src/service/config/v3.rs line 31 at r2 (raw file):

    residential_exit: bool,
    custom_dns: Option<Vec<String>>,
    network_stats: NetworkStatisticsConfig,

This struct is not versioned

Copy link
Collaborator

@pronebird pronebird left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 47 files reviewed, 4 unresolved discussions (waiting on @agentpietrucha, @doums, @mrkiwi, @neacsu, @rokas-ambrazevicius, @simonwicky, and @trojanfoe)


nym-vpn-core/crates/nym-vpn-lib-types/src/network_stats.rs line 32 at r2 (raw file):

    // - If the tunnel is connected in wireguard mode, it will go through wireguard
    // We thus need this option to allow users to report even if they can't connect (i.e. if they're being censored)
    /// Allow statistics sending, even if not conncetced to the mixnet/vpn

typo in connected

Copy link
Collaborator

@pronebird pronebird left a comment

Choose a reason for hiding this comment

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

@pronebird reviewed 5 of 40 files at r1, 9 of 26 files at r2, all commit messages.
Reviewable status: 14 of 47 files reviewed, 3 unresolved discussions (waiting on @agentpietrucha, @doums, @mrkiwi, @neacsu, @rokas-ambrazevicius, @simonwicky, and @trojanfoe)

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.

4 participants