Root cause: SdkPlatformConfigApi.fetchConfig 未传 packageName → 服务端返回400 → bugCollectEnabled=false → captureError 是空操作 修复内容: - SdkPlatformConfigApi: 增加 packageName 查询参数 - SdkPlatformConfig: 修正字段名 bugCollectApiUrl/features.bugCollect - XuqmSDK: 传入 appContext.packageName,读取 features?.bugCollect - Fingerprint: 使用 exceptionType(类名)替代 level 字符串,避免同一崩溃按级别分桶 - IssueEvent: 增加 eventId、breadcrumbs、DeviceInfo 扩展字段 - BugCollect: 增加 addBreadcrumb(),captureError/captureCrash 附加面包屑和设备信息 - LogUploader: 序列化 eventId/breadcrumbs/expanded device - LogQueue: 崩溃恢复使用 exceptionType 重建 fingerprint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 行
568 B
Kotlin
18 行
568 B
Kotlin
package com.xuqm.sdk.bugcollect
|
|
|
|
data class LogEvent(
|
|
val eventId: String? = java.util.UUID.randomUUID().toString(),
|
|
val name: String,
|
|
val properties: Map<String, Any?> = emptyMap(),
|
|
val appKey: String,
|
|
val userId: String? = null,
|
|
val sessionId: String? = null,
|
|
val platform: String,
|
|
val release: String,
|
|
val environment: String = "production",
|
|
val timestamp: Long = System.currentTimeMillis(),
|
|
val user: IssueEvent.UserInfo? = null,
|
|
val device: IssueEvent.DeviceInfo? = null,
|
|
val sdk: IssueEvent.SdkInfo? = null,
|
|
)
|