feat: upload diagnostics with redaction and crash capture
- 500-entry local ring buffer, immediate flush for warnings/errors - batch upload to POST /logs with device id, platform, version and session - redact tokens, Authorization headers and secrets before storage/upload - Android/desktop uncaught handlers persist a crash entry for the next launch - Settings diagnostics card with pending count, send now and clear - fall back cleanly when the server predates /logs - include X-Request-Id in API failure diagnostics; version 0.4.3
This commit is contained in:
1 parent
4d5a97cdac
commit
b1ccfc9ee1
20 files changed
+820
-21
No files matched your search
@@ -49,3 +49,5 @@ actual fun decodeImage(bytes: ByteArray): ImageBitmap? =
|
||||
runCatching { org.jetbrains.skia.Image.makeFromEncoded(bytes).toComposeImageBitmap() }.getOrNull()
|
||||
|
||||
actual fun isUnmeteredNetwork(): Boolean = true
|
||||
|
||||
internal actual fun <T> withLogLock(block: () -> T): T = block()
|
||||
@@ -3,10 +3,12 @@ package win.taptap.musicmanager.client
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.window.ComposeViewport
|
||||
import kotlinx.browser.document
|
||||
import win.taptap.musicmanager.client.logging.AppLog
|
||||
import win.taptap.musicmanager.client.ui.App
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
fun main() {
|
||||
AppLog.init(platformStorage())
|
||||
ComposeViewport(document.body!!) {
|
||||
App()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user