Skip to content

Commit

Permalink
Chore - Remove some expired metrics (#9228)
Browse files Browse the repository at this point in the history
* Remove push_message expired (and unused)  metric

* Remove android_daemon_status
  • Loading branch information
brizental authored Mar 14, 2024
1 parent 9e2c028 commit 5e5bc41
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 91 deletions.
24 changes: 0 additions & 24 deletions src/telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ void Telemetry::initialize() {
Controller* controller = vpn->controller();
Q_ASSERT(controller);

#if defined(MZ_ANDROID)
connect(AndroidVPNActivity::instance(), &AndroidVPNActivity::eventInitialized,
this, &Telemetry::onDaemonStatus);
#endif

connect(
controller, &Controller::handshakeFailed, this,
[](const QString& publicKey) {
Expand Down Expand Up @@ -299,22 +294,3 @@ void Telemetry::periodicStateRecorder() {
}
}
#endif

#if defined(MZ_ANDROID)
void Telemetry::onDaemonStatus(const QString& data) {
auto doc = QJsonDocument::fromJson(data.toUtf8());
bool connected = doc.object()["connected"].toBool(false);
if (!connected) {
// If we're not connected, connection health is irrelevant.
return;
}
auto status = doc.object()["connection-health-status"].toString();
if (status.isNull()) {
return;
}

mozilla::glean::sample::android_daemon_status.record(
mozilla::glean::sample::AndroidDaemonStatusExtra{._connectionHealthState =
status});
}
#endif
11 changes: 0 additions & 11 deletions src/telemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ class Telemetry final : public QObject {
void periodicStateRecorder();
#endif

#if defined(MZ_ANDROID)
/**
* @brief (Slot) - Processes a Daemon-Init response and records the daemon
* status to glean.
*
* @param data - A JSON string containting the response of EVENT_INIT
* @return * void
*/
void onDaemonStatus(const QString& data);
#endif

private:
QTimer m_connectionStabilityTimer;
QTimer m_vpnSessionPingTimer;
Expand Down
58 changes: 2 additions & 56 deletions src/telemetry/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,60 +365,6 @@ sample:
description: The language code chosen.
type: string

push_message_received:
type: event
lifetime: ping
send_in_pings:
- main
description: |
A device has been removed from the user's account.
bugs:
- https://github.com/mozilla-mobile/mozilla-vpn-client/issues/3982
data_reviews:
- https://github.com/mozilla-mobile/mozilla-vpn-client/pull/4275#issuecomment-1228532390
data_sensitivity:
- technical
notification_emails:
- [email protected]
- [email protected]
expires: 2023-12-31
extra_keys:
type:
description: |
The message type.
type: string

android_daemon_status:
type: event
lifetime: ping
send_in_pings:
- main
description: |
A status report of the Android Daemon. Contains information
if the daemon' connection health component.
This will help us understand if that component did activate,
and if so if it did help fix the connection.
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-3743
data_reviews:
- https://github.com/mozilla-mobile/mozilla-vpn-client/pull/5528#pullrequestreview-1262407370
data_sensitivity:
- technical
notification_emails:
- [email protected]
- [email protected]
expires: 2024-01-01
extra_keys:
connection_health_state:
description: |
The State of connection health. Possible values are:
deactivated-feature-flagged -> deactive due A/B testing.
deactivated -> vpn disconnected
active-not-silent-switched -> connection is healthy
active-silent-switched -> connection was unhealthy
active-panic-state-reached -> connection was unhealthy
type: string

iap_g_no_sku_details:
type: event
lifetime: ping
Expand Down Expand Up @@ -1149,8 +1095,8 @@ sample:
type: string
transport:
description: |
The Host network type (i.e wifi or 4g).
Possible values are Unknown, Disconnected, Local, Site, Online
The Host network type (i.e wifi or 4g).
Possible values are Unknown, Disconnected, Local, Site, Online
type: string

server_unavailable_error:
Expand Down

0 comments on commit 5e5bc41

Please sign in to comment.