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

Update analytic events #8789

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 102 additions & 1 deletion vector/src/main/java/im/vector/app/features/analytics/plan/Error.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,44 @@ data class Error(
*/
val context: String? = null,
/**
* Which crypto module is the client currently using.
* DEPRECATED: Which crypto module is the client currently using.
*/
val cryptoModule: CryptoModule? = null,
/**
* Which crypto backend is the client currently using.
*/
val cryptoSDK: CryptoSDK? = null,
val domain: Domain,
/**
* An heuristic based on event origin_server_ts and the current device
* creation time (origin_server_ts - device_ts). This would be used to
* get the source of the event scroll-back/live/initialSync.
*/
val eventLocalAgeMillis: Int? = null,
/**
* true if userDomain != senderDomain.
*/
val isFederated: Boolean? = null,
/**
* true if the current user is using matrix.org.
*/
val isMatrixDotOrg: Boolean? = null,
val name: Name,
/**
* UTDs can be permanent or temporary. If temporary, this field will
* contain the time it took to decrypt the message in milliseconds. If
* permanent should be -1.
*/
val timeToDecryptMillis: Int? = null,
/**
* true if the current user trusts their own identity (verified session)
* at time of decryption.
*/
val userTrustsOwnIdentity: Boolean? = null,
/**
* true if that unable to decrypt error was visible to the user.
*/
val wasVisibleToUser: Boolean? = null,
) : VectorAnalyticsEvent {

enum class Domain {
Expand All @@ -44,18 +77,79 @@ data class Error(
}

enum class Name {

/**
* E2EE domain error. Decryption failed for a message sent before the
* device logged in, and key backup is not enabled.
*/
HistoricalMessage,

/**
* E2EE domain error. The room key is known but is ratcheted (index >
* 0).
*/
OlmIndexError,

/**
* E2EE domain error. Generic unknown inbound group session error.
*/
OlmKeysNotSentError,

/**
* E2EE domain error. Any other decryption error (missing field, format
* errors...).
*/
OlmUnspecifiedError,

/**
* TO_DEVICE domain error. The to-device message failed to decrypt.
*/
ToDeviceFailedToDecrypt,

/**
* E2EE domain error. Decryption failed due to unknown error.
*/
UnknownError,

/**
* VOIP domain error. ICE negotiation failed.
*/
VoipIceFailed,

/**
* VOIP domain error. ICE negotiation timed out.
*/
VoipIceTimeout,

/**
* VOIP domain error. The call invite timed out.
*/
VoipInviteTimeout,

/**
* VOIP domain error. The user hung up the call.
*/
VoipUserHangup,

/**
* VOIP domain error. The user's media failed to start.
*/
VoipUserMediaFailed,
}

enum class CryptoSDK {

/**
* Legacy crypto backend specific to each platform.
*/
Legacy,

/**
* Cross-platform crypto backend written in Rust.
*/
Rust,
}

enum class CryptoModule {

/**
Expand All @@ -75,8 +169,15 @@ data class Error(
return mutableMapOf<String, Any>().apply {
context?.let { put("context", it) }
cryptoModule?.let { put("cryptoModule", it.name) }
cryptoSDK?.let { put("cryptoSDK", it.name) }
put("domain", domain.name)
eventLocalAgeMillis?.let { put("eventLocalAgeMillis", it) }
isFederated?.let { put("isFederated", it) }
isMatrixDotOrg?.let { put("isMatrixDotOrg", it) }
put("name", name.name)
timeToDecryptMillis?.let { put("timeToDecryptMillis", it) }
userTrustsOwnIdentity?.let { put("userTrustsOwnIdentity", it) }
wasVisibleToUser?.let { put("wasVisibleToUser", it) }
}.takeIf { it.isNotEmpty() }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,28 @@ data class Interaction(
*/
MobileRoomAddHome,

/**
* User switched the favourite toggle on Room Details screen.
*/
MobileRoomFavouriteToggle,

/**
* User tapped on Leave Room button on Room Details screen.
*/
MobileRoomLeave,

/**
* User adjusted their favourite rooms using the context menu on a room
* in the room list.
*/
MobileRoomListRoomContextMenuFavouriteToggle,

/**
* User adjusted their unread rooms using the context menu on a room in
* the room list.
*/
MobileRoomListRoomContextMenuUnreadToggle,

/**
* User tapped on Threads button on Room screen.
*/
Expand Down Expand Up @@ -306,6 +323,18 @@ data class Interaction(
*/
WebRoomListRoomTileContextMenuLeaveItem,

/**
* User marked a message as read using the context menu on a room tile
* in the room list in Element Web/Desktop.
*/
WebRoomListRoomTileContextMenuMarkRead,

/**
* User marked a room as unread using the context menu on a room tile in
* the room list in Element Web/Desktop.
*/
WebRoomListRoomTileContextMenuMarkUnread,

/**
* User accessed room settings using the context menu on a room tile in
* the room list in Element Web/Desktop.
Expand Down Expand Up @@ -408,6 +437,18 @@ data class Interaction(
*/
WebThreadViewBackButton,

/**
* User clicked on the Threads Activity Centre button of Element
* Web/Desktop.
*/
WebThreadsActivityCentreButton,

/**
* User clicked on a room in the Threads Activity Centre of Element
* Web/Desktop.
*/
WebThreadsActivityCentreRoomItem,

/**
* User selected a thread in the Threads panel in Element Web/Desktop.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ data class MobileScreen(
*/
MyGroups,

/**
* The screen containing tests to help user to fix issues around
* notifications.
*/
NotificationTroubleshoot,

/**
* The People tab on mobile that lists all the DM rooms you have joined.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.app.features.analytics.plan

import im.vector.app.features.analytics.itf.VectorAnalyticsEvent

// GENERATED FILE, DO NOT EDIT. FOR MORE INFORMATION VISIT
// https://github.com/matrix-org/matrix-analytics-events/

/**
* Triggered when the user runs the troubleshoot notification test suite.
*/
data class NotificationTroubleshoot(
/**
* Whether one or more tests are in error.
*/
val hasError: Boolean,
) : VectorAnalyticsEvent {

override fun getName() = "NotificationTroubleshoot"

override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
put("hasError", hasError)
}.takeIf { it.isNotEmpty() }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
data class PollEnd(
/**
* Do not use this. Remove this property when the kotlin type generator
* can properly generate types without proprties other than the event
* can properly generate types without properties other than the event
* name.
*/
val doNotUse: Boolean? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
data class PollVote(
/**
* Do not use this. Remove this property when the kotlin type generator
* can properly generate types without proprties other than the event
* can properly generate types without properties other than the event
* name.
*/
val doNotUse: Boolean? = null,
Expand Down
Loading
Loading