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

macOS: Add pixels to track VPN wake and stop attempts #2694

Merged
merged 9 commits into from
Apr 26, 2024

Conversation

diegoreymendez
Copy link
Contributor

@diegoreymendez diegoreymendez commented Apr 24, 2024

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

iOS PR:duckduckgo/iOS#2785
BSK PR: duckduckgo/BrowserServicesKit#797

Description

Adds pixels to track VPN wake and stop attempts.

Testing

  1. Test starting and stopping the VPN.
  2. Test updating the extension.
  3. Text pixels: best way is to disable dry mode and see if you get pixels in Kibana.

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@@ -1082,7 +1082,6 @@
4B2D06292A11C0C900DE1F49 /* Bundle+VPN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D605E2A0B29FA00BCD287 /* Bundle+VPN.swift */; };
4B2D062A2A11C0C900DE1F49 /* NetworkProtectionOptionKeyExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D605F2A0B29FA00BCD287 /* NetworkProtectionOptionKeyExtension.swift */; };
4B2D062C2A11C0E100DE1F49 /* Networking in Frameworks */ = {isa = PBXBuildFile; productRef = 4B2D062B2A11C0E100DE1F49 /* Networking */; };
4B2D062D2A11C12300DE1F49 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85799C1725DEBB3F0007EC87 /* Logging.swift */; };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't want Logging.swift in system extensions, so I removed it from our tunnel and proxy sysexes.

case .begin:
PixelKit.fire(
NetworkProtectionPixelEvent.networkProtectionTunnelStopAttempt,
frequency: .standard,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Daily attempts are useless, unfortunately.

//
// Ref: https://app.asana.com/0/72649045549333/1204668639086684/f
//
exit(EXIT_SUCCESS)
Copy link
Contributor Author

@diegoreymendez diegoreymendez Apr 24, 2024

Choose a reason for hiding this comment

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

I found that after our recent changes, stopping the VPN works best when this is removed. Sometimes it was taking a while to stop with this still here.

I'll be testing this in macOS 11 on the intel mac mini shortly.

@@ -27,7 +27,7 @@ import PixelKit

final class MacTransparentProxyProvider: TransparentProxyProvider {

static var vpnProxyLogger = Logger(subsystem: OSLog.subsystem, category: "VPN Proxy")
static var vpnProxyLogger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "DuckDuckGo", category: "VPN Proxy")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to avoid the dependency with Logging.swift.

@diegoreymendez diegoreymendez changed the title macOS | iOS: Add pixels to track VPN wake and stop attempts macOS: Add pixels to track VPN wake and stop attempts Apr 24, 2024
@diegoreymendez diegoreymendez marked this pull request as ready for review April 24, 2024 10:48
diegoreymendez added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Apr 26, 2024
diegoreymendez added a commit to duckduckgo/iOS that referenced this pull request Apr 26, 2024
@diegoreymendez diegoreymendez merged commit 7e629fa into main Apr 26, 2024
18 checks passed
@diegoreymendez diegoreymendez deleted the diego/add-wake-and-stop-pixels branch April 26, 2024 15:48
samsymons added a commit that referenced this pull request Apr 26, 2024
…utdown

# By Dax the Duck (9) and others
# Via GitHub (6) and others
* main: (47 commits)
  Update BSK to 141.1.1 (#2713)
  macOS: VPN Metadata Improvements (#2704)
  duck page suggestions (#2666)
  macOS: Add pixels to track VPN wake and stop attempts (#2694)
  Trusted url indicator (#2665)
  remove Tab.TabContent.url (#2647)
  Bump version to 1.85.0 (176)
  Update release automation to support Privacy Pro section in release notes (#2710)
  Fix for VPN stop issues. (#2689)
  Hard-codes the VPN waitlist flags to ON (#2709)
  Add subscription status to the macOS metadata (#2680)
  Bump version to 1.85.0 (175)
  Call finish in the correct place (#2702)
  Fix layout issue on DBP (#2700)
  Update autoconsent to v10.6.1 (#2618)
  Make Clear All History shortcut available without entering Main Menu (#2682)
  Fix DataBrokerProtectionProcessor.swift lint
  Fix SwiftLint
  Add parameter allowed encoding to error descriptions (#2691)
  Remove debug flags
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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