Sync analytics plan

This commit is contained in:
bmarty 2023-03-06 00:03:43 +00:00 committed by GitHub
parent 97b47302ef
commit a6211a1da3
1 changed files with 18 additions and 0 deletions

View File

@ -29,6 +29,10 @@ data class Error(
* Context - client defined, can be used for debugging. * Context - client defined, can be used for debugging.
*/ */
val context: String? = null, val context: String? = null,
/**
* Which crypto module is the client currently using.
*/
val cryptoModule: CryptoModule? = null,
val domain: Domain, val domain: Domain,
val name: Name, val name: Name,
) : VectorAnalyticsEvent { ) : VectorAnalyticsEvent {
@ -52,11 +56,25 @@ data class Error(
VoipUserMediaFailed, VoipUserMediaFailed,
} }
enum class CryptoModule {
/**
* Native / legacy crypto module specific to each platform.
*/
Native,
/**
* Shared / cross-platform crypto module written in Rust.
*/
Rust,
}
override fun getName() = "Error" override fun getName() = "Error"
override fun getProperties(): Map<String, Any>? { override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply { return mutableMapOf<String, Any>().apply {
context?.let { put("context", it) } context?.let { put("context", it) }
cryptoModule?.let { put("cryptoModule", it.name) }
put("domain", domain.name) put("domain", domain.name)
put("name", name.name) put("name", name.name)
}.takeIf { it.isNotEmpty() } }.takeIf { it.isNotEmpty() }