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

NetP feature usage pixels #2027

Merged
merged 6 commits into from
Sep 21, 2023
Merged

Conversation

graeme
Copy link
Contributor

@graeme graeme commented Sep 20, 2023

Task/Issue URL: https://app.asana.com/0/0/1205537962077888/f

Description:

Pixels for determining performance and how often users are using the VPN.

  • Network Protection daily active user: m_netp_daily_active_d
  • Latency: m_netp_latency
    • Trigger: Sent periodically from the NetP extension
    • Parameters:
      • latency: An integer value representing the user's latency in milliseconds
      • server: The identifier of the server, taken from the NetP server list
      • network_type: The user's network type (one of cell, wifi, eth)
  • Rekey: m_netp_rekey_completed

Steps to test this PR:

  1. Put a breakpoint in the Pixel.fire(pixelNamed… function at L: 203
  2. Run the PacketTunnelProvider in debug
  3. Start Network Protection (Settings -> Network Protection)
  4. Ensure PacketTunnelProvider is attached to the debugger
  5. Ensure that a request is made intermittently with the latency pixel (and all params)
  6. Switch to cellular: ensure a request is made with the network_type Pixel.
  7. The daily active user pixel could be hard to test without adding a print / log of some kind.

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@graeme graeme changed the base branch from develop to graeme/add-wireguard-pixels September 20, 2023 13:22
Base automatically changed from graeme/add-wireguard-pixels to graeme/netp-error-pixels September 21, 2023 11:22
Base automatically changed from graeme/netp-error-pixels to develop September 21, 2023 13:47
@graeme graeme force-pushed the graeme/add-netp-feature-usage-pixels branch from f619d7c to fb16b56 Compare September 21, 2023 14:46
@graeme graeme requested a review from samsymons September 21, 2023 15:37
Comment on lines +33 to +39
func expireRegistrationKeyNow() async {
guard let activeSession = try? await ConnectionSessionUtilities.activeSession() else {
return
}

try? activeSession.sendProviderMessage(.expireRegistrationKey)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👍

@@ -63,6 +66,12 @@ final class NetworkProtectionDebugViewController: UITableViewController {

}

enum RegistrationKeyRows: Int, CaseIterable {

case expireNow
Copy link
Contributor

Choose a reason for hiding this comment

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

In the future we could add last rekey date here, so it's easy to see how well this is working in real-world scenarios, but we don't need to do it here. We have a project dedicated to the debug menu which tbh I would like to break up into tasks, so it can be done as a part of that.

Copy link
Contributor

@samsymons samsymons left a comment

Choose a reason for hiding this comment

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

LGTM!

@graeme graeme merged commit ca88fdc into develop Sep 21, 2023
8 checks passed
@graeme graeme deleted the graeme/add-netp-feature-usage-pixels branch September 21, 2023 17:47
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.

2 participants