Merge pull request #8211 from vector-im/sync-analytics-plan

Sync analytics plan
This commit is contained in:
Benoit Marty 2023-03-06 09:50:34 +01:00 committed by GitHub
commit 5eded5cb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.
*/
val context: String? = null,
/**
* Which crypto module is the client currently using.
*/
val cryptoModule: CryptoModule? = null,
val domain: Domain,
val name: Name,
) : VectorAnalyticsEvent {
@ -52,11 +56,25 @@ data class Error(
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 getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
context?.let { put("context", it) }
cryptoModule?.let { put("cryptoModule", it.name) }
put("domain", domain.name)
put("name", name.name)
}.takeIf { it.isNotEmpty() }