Skip to content

Commit fda38e9

Browse files
committed
Update analytic events
1 parent d54e605 commit fda38e9

File tree

10 files changed

+398
-5
lines changed

10 files changed

+398
-5
lines changed

vector/src/main/java/im/vector/app/features/analytics/plan/Error.kt

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,44 @@ data class Error(
3030
*/
3131
val context: String? = null,
3232
/**
33-
* Which crypto module is the client currently using.
33+
* DEPRECATED: Which crypto module is the client currently using.
3434
*/
3535
val cryptoModule: CryptoModule? = null,
36+
/**
37+
* Which crypto backend is the client currently using.
38+
*/
39+
val cryptoSDK: CryptoSDK? = null,
3640
val domain: Domain,
41+
/**
42+
* An heuristic based on event origin_server_ts and the current device
43+
* creation time (origin_server_ts - device_ts). This would be used to
44+
* get the source of the event scroll-back/live/initialSync.
45+
*/
46+
val eventLocalAgeMillis: Int? = null,
47+
/**
48+
* true if userDomain != senderDomain.
49+
*/
50+
val isFederated: Boolean? = null,
51+
/**
52+
* true if the current user is using matrix.org
53+
*/
54+
val isMatrixDotOrg: Boolean? = null,
3755
val name: Name,
56+
/**
57+
* UTDs can be permanent or temporary. If temporary, this field will
58+
* contain the time it took to decrypt the message in milliseconds. If
59+
* permanent should be -1
60+
*/
61+
val timeToDecryptMillis: Int? = null,
62+
/**
63+
* true if the current user trusts their own identity (verified session)
64+
* at time of decryption.
65+
*/
66+
val userTrustsOwnIdentity: Boolean? = null,
67+
/**
68+
* true if that unable to decrypt error was visible to the user
69+
*/
70+
val wasVisibleToUser: Boolean? = null,
3871
) : VectorAnalyticsEvent {
3972

4073
enum class Domain {
@@ -44,18 +77,79 @@ data class Error(
4477
}
4578

4679
enum class Name {
80+
81+
/**
82+
* E2EE domain error. Decryption failed for a message sent before the
83+
* device logged in, and key backup is not enabled.
84+
*/
85+
HistoricalMessage,
86+
87+
/**
88+
* E2EE domain error. The room key is known but is ratcheted (index >
89+
* 0).
90+
*/
4791
OlmIndexError,
92+
93+
/**
94+
* E2EE domain error. Generic unknown inbound group session error.
95+
*/
4896
OlmKeysNotSentError,
97+
98+
/**
99+
* E2EE domain error. Any other decryption error (missing field, format
100+
* errors...).
101+
*/
49102
OlmUnspecifiedError,
103+
104+
/**
105+
* TO_DEVICE domain error. The to-device message failed to decrypt.
106+
*/
50107
ToDeviceFailedToDecrypt,
108+
109+
/**
110+
* E2EE domain error. Decryption failed due to unknown error.
111+
*/
51112
UnknownError,
113+
114+
/**
115+
* VOIP domain error. ICE negotiation failed.
116+
*/
52117
VoipIceFailed,
118+
119+
/**
120+
* VOIP domain error. ICE negotiation timed out.
121+
*/
53122
VoipIceTimeout,
123+
124+
/**
125+
* VOIP domain error. The call invite timed out.
126+
*/
54127
VoipInviteTimeout,
128+
129+
/**
130+
* VOIP domain error. The user hung up the call.
131+
*/
55132
VoipUserHangup,
133+
134+
/**
135+
* VOIP domain error. The user's media failed to start.
136+
*/
56137
VoipUserMediaFailed,
57138
}
58139

140+
enum class CryptoSDK {
141+
142+
/**
143+
* Legacy crypto backend specific to each platform.
144+
*/
145+
Legacy,
146+
147+
/**
148+
* Cross-platform crypto backend written in Rust.
149+
*/
150+
Rust,
151+
}
152+
59153
enum class CryptoModule {
60154

61155
/**
@@ -75,8 +169,15 @@ data class Error(
75169
return mutableMapOf<String, Any>().apply {
76170
context?.let { put("context", it) }
77171
cryptoModule?.let { put("cryptoModule", it.name) }
172+
cryptoSDK?.let { put("cryptoSDK", it.name) }
78173
put("domain", domain.name)
174+
eventLocalAgeMillis?.let { put("eventLocalAgeMillis", it) }
175+
isFederated?.let { put("isFederated", it) }
176+
isMatrixDotOrg?.let { put("isMatrixDotOrg", it) }
79177
put("name", name.name)
178+
timeToDecryptMillis?.let { put("timeToDecryptMillis", it) }
179+
userTrustsOwnIdentity?.let { put("userTrustsOwnIdentity", it) }
180+
wasVisibleToUser?.let { put("wasVisibleToUser", it) }
80181
}.takeIf { it.isNotEmpty() }
81182
}
82183
}

vector/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,28 @@ data class Interaction(
8585
*/
8686
MobileRoomAddHome,
8787

88+
/**
89+
* User switched the favourite toggle on Room Details screen.
90+
*/
91+
MobileRoomFavouriteToggle,
92+
8893
/**
8994
* User tapped on Leave Room button on Room Details screen.
9095
*/
9196
MobileRoomLeave,
9297

98+
/**
99+
* User adjusted their favourite rooms using the context menu on a room
100+
* in the room list.
101+
*/
102+
MobileRoomListRoomContextMenuFavouriteToggle,
103+
104+
/**
105+
* User adjusted their unread rooms using the context menu on a room in
106+
* the room list.
107+
*/
108+
MobileRoomListRoomContextMenuUnreadToggle,
109+
93110
/**
94111
* User tapped on Threads button on Room screen.
95112
*/
@@ -306,6 +323,18 @@ data class Interaction(
306323
*/
307324
WebRoomListRoomTileContextMenuLeaveItem,
308325

326+
/**
327+
* User marked a message as read using the context menu on a room tile
328+
* in the room list in Element Web/Desktop.
329+
*/
330+
WebRoomListRoomTileContextMenuMarkRead,
331+
332+
/**
333+
* User marked a room as unread using the context menu on a room tile in
334+
* the room list in Element Web/Desktop.
335+
*/
336+
WebRoomListRoomTileContextMenuMarkUnread,
337+
309338
/**
310339
* User accessed room settings using the context menu on a room tile in
311340
* the room list in Element Web/Desktop.
@@ -408,6 +437,18 @@ data class Interaction(
408437
*/
409438
WebThreadViewBackButton,
410439

440+
/**
441+
* User clicked on the Threads Activity Centre button of Element
442+
* Web/Desktop.
443+
*/
444+
WebThreadsActivityCentreButton,
445+
446+
/**
447+
* User clicked on a room in the Threads Activity Centre of Element
448+
* Web/Desktop.
449+
*/
450+
WebThreadsActivityCentreRoomItem,
451+
411452
/**
412453
* User selected a thread in the Threads panel in Element Web/Desktop.
413454
*/

vector/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ data class MobileScreen(
119119
*/
120120
MyGroups,
121121

122+
/**
123+
* The screen containing tests to help user to fix issues around
124+
* notifications.
125+
*/
126+
NotificationTroubleshoot,
127+
122128
/**
123129
* The People tab on mobile that lists all the DM rooms you have joined.
124130
*/
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) 2021 New Vector Ltd
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package im.vector.app.features.analytics.plan
18+
19+
import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
20+
21+
// GENERATED FILE, DO NOT EDIT. FOR MORE INFORMATION VISIT
22+
// https://github.com/matrix-org/matrix-analytics-events/
23+
24+
/**
25+
* Triggered when the user runs the troubleshoot notification test suite.
26+
*/
27+
data class NotificationTroubleshoot(
28+
/**
29+
* Whether one or more tests are in error.
30+
*/
31+
val hasError: Boolean,
32+
) : VectorAnalyticsEvent {
33+
34+
override fun getName() = "NotificationTroubleshoot"
35+
36+
override fun getProperties(): Map<String, Any>? {
37+
return mutableMapOf<String, Any>().apply {
38+
put("hasError", hasError)
39+
}.takeIf { it.isNotEmpty() }
40+
}
41+
}

vector/src/main/java/im/vector/app/features/analytics/plan/PollCreation.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ data class PollCreation(
4141

4242
enum class Action {
4343
/**
44-
* Newly created poll.
44+
* Newly created poll
4545
*/
4646
Create,
4747

4848
/**
49-
* Edit of an existing poll.
49+
* Edit of an existing poll
5050
*/
5151
Edit,
5252
}

vector/src/main/java/im/vector/app/features/analytics/plan/PollEnd.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
2727
data class PollEnd(
2828
/**
2929
* Do not use this. Remove this property when the kotlin type generator
30-
* can properly generate types without proprties other than the event
30+
* can properly generate types without properties other than the event
3131
* name.
3232
*/
3333
val doNotUse: Boolean? = null,

vector/src/main/java/im/vector/app/features/analytics/plan/PollVote.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
2727
data class PollVote(
2828
/**
2929
* Do not use this. Remove this property when the kotlin type generator
30-
* can properly generate types without proprties other than the event
30+
* can properly generate types without properties other than the event
3131
* name.
3232
*/
3333
val doNotUse: Boolean? = null,

0 commit comments

Comments
 (0)