XuqmGroup-AndroidSDK/sdk-bugcollect/src/main/java/com/xuqm/sdk/bugcollect/Breadcrumb.kt
XuqmGroup 4896f24af8 feat(bugcollect): SDK v1.1.0 — 修复 packageName 缺失导致 captureError 静默失败
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>
2026-06-17 15:30:40 +08:00

10 行
241 B
Kotlin

package com.xuqm.sdk.bugcollect
data class Breadcrumb(
val timestamp: Long = System.currentTimeMillis(),
val category: String,
val message: String,
val level: String = "info",
val data: Map<String, Any?> = emptyMap(),
)