Adjust metrics to the new specifications (#5937)
* Add `AnalyticsTransactions` with a set of `TransactionDefinition` items matching those in the user story * Use that for `AnalyticsLongRunningTransactions`, make sure we send the right fields (name, operation, description) * Add `AnalyticsSendMessageWatcher` to track how long it takes for an event to be sent and for us to get a call back for that from sync * Add `Noop` implementation for enterprise
This commit is contained in:
committed by
GitHub
parent
bc62d4c8ba
commit
71031008dd
@@ -177,4 +177,9 @@ interface JoinedRoom : BaseRoom {
|
||||
*
|
||||
*/
|
||||
suspend fun withdrawVerificationAndResend(userIds: List<UserId>, sendHandle: SendHandle): Result<Unit>
|
||||
|
||||
/**
|
||||
* Subscribe to a [Flow] of [SendQueueUpdate] related to this room.
|
||||
*/
|
||||
fun subscribeToSendQueueUpdates(): Flow<SendQueueUpdate>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.matrix.api.room
|
||||
|
||||
import io.element.android.libraries.matrix.api.core.EventId
|
||||
import io.element.android.libraries.matrix.api.core.TransactionId
|
||||
import io.element.android.libraries.matrix.api.media.MediaSource
|
||||
|
||||
sealed interface SendQueueUpdate {
|
||||
data class NewLocalEvent(val transactionId: TransactionId) : SendQueueUpdate
|
||||
data class CancelledLocalEvent(val transactionId: TransactionId) : SendQueueUpdate
|
||||
data class ReplacedLocalEvent(val transactionId: TransactionId) : SendQueueUpdate
|
||||
data class SendError(val transactionId: TransactionId) : SendQueueUpdate
|
||||
data class RetrySendingEvent(val transactionId: TransactionId) : SendQueueUpdate
|
||||
data class SentEvent(val transactionId: TransactionId, val eventId: EventId) : SendQueueUpdate
|
||||
data class MediaUpload(val relatedTo: EventId, val file: MediaSource?, val index: Long, val progress: Float) : SendQueueUpdate
|
||||
}
|
||||
Reference in New Issue
Block a user