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

VPN-2988 - Record events on controller error steps #4594

Merged
merged 3 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Record event on server unavailable error
  • Loading branch information
brizental committed Oct 7, 2022
commit e0782d6d6449b696614c253a947e81b0fb5c63a6
20 changes: 17 additions & 3 deletions glean/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0

sample:

addon_state_changed:
type: event
lifetime: ping
Expand Down Expand Up @@ -71,7 +70,6 @@ sample:
Received, Notified, Read, or Dismissed
type: string


addon_cta_clicked:
type: event
lifetime: ping
Expand Down Expand Up @@ -566,7 +564,6 @@ sample:
- amarchesini@mozilla.com
expires: never


connection_health_no_signal:
type: event
lifetime: ping
Expand Down Expand Up @@ -1047,6 +1044,23 @@ sample:
description: The Host network type (i.e wifi or 4g)
type: string

server_unavailable_error:
type: event
lifetime: ping
send_in_pings:
- main
description: |
A "Server unavailable" error has occured.
bugs:
- https://github.com/mozilla-mobile/mozilla-vpn-client/issues/4589
data_reviews:
- TODO
data_sensitivity:
- technical
notification_emails:
- brizental@mozilla.com
expires: never

app_step:
type: event
lifetime: ping
Expand Down
1 change: 1 addition & 0 deletions src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ bool Controller::processNextStep() {

if (nextStep == ServerUnavailable) {
logger.info() << "Server Unavailable - Ping succeeded: " << m_ping_received;

emit readyToServerUnavailable(m_ping_received);
return true;
}
Expand Down
7 changes: 7 additions & 0 deletions src/telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ void Telemetry::initialize() {
emit vpn->recordGleanEvent(GleanSample::controllerStateOff);
}
});

connect(controller, &Controller::readyToServerUnavailable, this, [this]() {
brizental marked this conversation as resolved.
Show resolved Hide resolved
MozillaVPN* vpn = MozillaVPN::instance();
Q_ASSERT(vpn);

emit vpn->recordGleanEvent(GleanSample::serverUnavailableError);
});
}

void Telemetry::connectionStabilityEvent() {
Expand Down