提交图

32 次代码提交

作者 SHA1 备注 提交日期
XuqmGroup
227425b80a fix(bugcollect): 修复 trend 接口 500 — GROUP BY 兼容 MySQL only_full_group_by
SELECT e.createdAt 配合 GROUP BY DATE(e.createdAt) 在 MySQL strict mode
下触发 Expression #1 of SELECT list is not in GROUP BY clause 错误。
改为 MIN(e.createdAt) 作为聚合列,类型不变,LogService 无需修改。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 18:53:49 +08:00
XuqmGroup
a934abe7aa fix(db): 修复 sourcemap 上传因唯一约束缺少 build_id 导致 HTTP 500
uk_map 约束为 (app_key, platform, app_version, bundle_name),未包含
build_id。Gradle 插件每次构建生成不同 buildId,服务端查不到记录后尝试
INSERT,触发 Duplicate entry 约束冲突返回 500。

V8 migration:删除旧约束,重建为
(app_key, platform, app_version, build_id, bundle_name)。
MySQL UNIQUE 对 NULL 视为不相等,历史 build_id=NULL 记录不受影响;
应用层已通过 findByBuildIdIsNull 防止 NULL 记录重复插入。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 15:19:03 +08:00
XuqmGroup
e294d42dff fix(bugcollect): 修复 V6 no-op 导致 build_id 列缺失引发的 502
V6 迁移原为空操作(SELECT 1),导致 log_issue_events 和 log_sourcemaps
表缺少 build_id 列,服务启动时 Hibernate schema 校验失败并持续重启。

- 重写 V6 为实际 DDL(ALTER TABLE ... ADD COLUMN build_id)
- 新增 V7 幂等修复迁移,使用条件预处理语句,对已有列的部署安全跳过

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 18:53:57 +08:00
XuqmGroup
028ebf4222 fix(file): 解决文件下载和时间戳处理问题
- 实现文件名扩展名推断逻辑,从URL路径自动提取并添加扩展名
- 添加下载错误处理和日志记录功能
- 在下载失败时显示错误通知而非成功通知
- 将服务器时间戳处理统一调整为CST(亚洲/上海)时区
- 更新sdk-core版本号至1.1.6-SNAPSHOT
2026-06-23 16:43:19 +08:00
XuqmGroup
45ea8060b9 feat(sourcemap): 新增单条删除和全量裁剪接口,列表按上传时间倒序
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 11:56:40 +08:00
XuqmGroup
67f9b37fe8 fix(bugcollect): 新 issue 创建时漏插 log_issue_users 导致 affectedUsers 偏低
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 11:39:51 +08:00
XuqmGroup
d02cd10714 feat(sourcemap): 上传后自动裁剪,每版本保留最新 3 条,最多保留 5 个版本
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 11:39:21 +08:00
XuqmGroup
45a08c1e3a fix(bugcollect): LogEventEntity 无 buildId,queryEvents 映射改用 null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 18:28:37 +08:00
XuqmGroup
f6dc3f7c72 feat(bugcollect): 事件响应中暴露 buildId 字段
IssueEventResponse 新增 buildId 字段,将构建 ID 包含在 events API 响应中,
方便前端展示具体构建对应的错误。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 18:27:08 +08:00
XuqmGroup
39d62f2080 fix(bugcollect): 修复 callSymbolicator 字段名 sourcemap → mappingFile
Android symbolicator API 期望 mappingFile 字段,之前误用 sourcemap 导致
符号化返回 "mappingFile is required for Android" 错误,堆栈无法还原。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 17:51:27 +08:00
XuqmGroup
e7a0d740d2 fix(bugcollect): V6 改为空迁移,所有 DDL 已手动应用
PREPARE/EXECUTE 语法在 Flyway 中不可用;V6 的所有 schema 变更
(log_sourcemaps.build_id、uk_map_build、idx_sm_version_latest、
log_issue_events.build_id)已手动执行到数据库,此脚本改为 SELECT 1
让 Flyway 顺利完成 V6 的版本记录。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 17:26:42 +08:00
XuqmGroup
f0cd3b5d33 fix(bugcollect): 修复 V6 迁移 SQL 错误并改为幂等执行
- AFTER app_version(列名)替代 AFTER release(Java字段名)
- 使用 information_schema 条件检查实现幂等,防止重复执行报错
- LogService log 语句中 issueId → eventId

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 17:12:51 +08:00
XuqmGroup
cfd5d67ce9 fix(bugcollect): 修复 LogService symbolication 日志中的变量名错误
log.info/error 中误用 issueId,改为 eventId,修复编译错误。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 17:03:33 +08:00
XuqmGroup
4acec019f7 feat(bugcollect): buildId 支持相同版本多包 sourcemap 与精确符号化
- V6 迁移:log_sourcemaps 新增 build_id 列,唯一键改为
  (app_key, platform, app_version, build_id, bundle_name);
  log_issue_events 新增 build_id 列
- SourcemapService: 按 buildId 精确匹配,找不到时回退到最新上传
  (findFirstByUploadedAtDesc);存储路径包含 buildId 目录
- LogService: 修复 symbolication 事件查找 bug(原使用 issueId 查
  event 表,现改为 eventId);事件保存后取返回值获取正确 ID
- LogController/DTO: upload 接口新增可选 buildId 参数;事件批量
  上报 DTO 新增 buildId 字段
- tenant-service: 补充 bugcollect-api-url 配置项

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:49:38 +08:00
XuqmGroup
dea5038de2 feat: bugcollect 添加 Sourcemap 列表 API
- 新增 GET /bugcollect/v1/sourcemaps 端点
- SourcemapService 新增 listByAppKey 方法
- 新增 SourcemapInfo DTO
- LogSourcemapRepository 新增 findByAppKey 查询

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-19 03:01:54 +08:00
XuqmGroup
a8ad342336 feat: 集成符号化服务 - 实现 triggerSymbolicationAsync
- 注入 SourcemapService 到 LogService
- 实现 triggerSymbolicationAsync 调用符号化服务
- 支持 RN/Android/iOS/Flutter 堆栈符号化
- 新增 symbolicator.url 配置

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-19 02:50:56 +08:00
XuqmGroup
f5019d11e8 fix: 修复 IssueResponse 构造函数缺少 type 参数
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-19 01:35:35 +08:00
XuqmGroup
5b1e04b6d1 feat: update-service 签名验证 + bugcollect 统计图表 API + 修复字段映射
- update-service: 集成 AppSignatureAuthFilter 签名验证
- update-service: 添加 TenantAppSecretResolver
- bugcollect: 新增 /statistics 统计 API 端点
- bugcollect: 修复 OverviewResponse 字段名(crashRateTrend/topIssues/crashRate)
- bugcollect: 修复 IssueResponse 添加 type 字段
- bugcollect: 修复 affectedUsers 语义(从 openIssues 改为真正的受影响用户数)
- bugcollect: 新增 StatisticsResponse DTO
- bugcollect: LogIssueRepository 新增统计查询方法

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-19 01:26:36 +08:00
XuqmGroup
e551fb3cb2 revert: 恢复 bugcollect controller 路径为 /bugcollect/v1(公有化兼容) 2026-06-19 00:46:31 +08:00
XuqmGroup
8ac2a37e7f fix: bugcollect controller 路径从 /bugcollect/v1 改为 /api/bugcollect/v1,匹配 nginx 路由 2026-06-19 00:41:07 +08:00
XuqmGroup
ff9ccc4447 fix: bugcollect V4 拆分为 V4+V5,解决 MySQL 不兼容 ADD COLUMN IF NOT EXISTS 问题
V4: CREATE TABLE IF NOT EXISTS(全部幂等)
V5: ALTER TABLE ADD COLUMN + CREATE INDEX(升级场景需手动处理)
2026-06-18 23:56:17 +08:00
XuqmGroup
4a3cb74954 fix: bugcollect V4 迁移移除不兼容的 IF NOT EXISTS 语法 + docker-compose 补充 env_file 和密码修复 2026-06-18 23:52:22 +08:00
XuqmGroup
ae56369e03 fix: 所有服务禁用 Flyway validate-on-migrate,防止迁移文件修改后 checksum 不匹配导致 crash-loop
升级场景下 V1__init.sql 被修改后,数据库中旧 checksum 与新代码不一致,
Flyway 默认 validate-on-migrate=true 会校验失败导致服务无法启动。
添加 validate-on-migrate: false 使服务可以正常启动。
2026-06-18 22:44:31 +08:00
XuqmGroup
7cc0962df2 fix(bugcollect): V4 迁移 SQL 修复 ADD INDEX IF NOT EXISTS 语法
MySQL 不支持 ALTER TABLE ADD INDEX IF NOT EXISTS,改用 CREATE INDEX。
已在生产数据库手动修复并标记 Flyway 迁移成功。

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 13:59:38 +08:00
XuqmGroup
e0e8dcb092 fix(bugcollect): 修复 queryEvents 中 IssueEventResponse 构造参数不匹配
commit 8770f50 重构 IssueEventResponse 为 ExceptionInfo 嵌套结构(20→16字段),
但 queryEvents 方法的内联构造调用未同步更新,导致 Jenkins 构建失败:
  constructor IssueEventResponse cannot be applied to given types

修复:将内联构造改为匹配新 record 的 16 参数调用,device 字段使用 parseJsonField 处理。

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 11:23:24 +08:00
XuqmGroup
fbc9d02e2a feat(bugcollect): 新增 PUT /issues/{id}/reopen 接口
- LogService.reopenIssue() 将状态设回 open
- LogController 暴露 /issues/{id}/reopen 端点

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 10:47:51 +08:00
XuqmGroup
8770f505f7 fix(bugcollect): 修复 BugCollect-API-v1-Review 全量37项问题
服务端:
- IssueResponse 移除 isResolved,统一使用 status 字段
- IssueEventResponse 重构为 ExceptionInfo 嵌套结构,breadcrumbs/tags/device 序列化为 Object
- IssueResponse 新增 affectedUsers 字段,通过 log_issue_users 去重计数
- WebhookResponse 将 secret 替换为 hasSecret boolean
- WebhookRequest 新增 secret 字段
- LogWebhookEntity 新增 secret 列
- 新增 LogIssueUserEntity / LogIssueUserRepository 实现 affectedUsers 去重
- LogIssueRepository.findByFilters 新增 assignee、environment 过滤
- LogService.queryIssues 新增 assignee、environment 参数
- LogService.toIssueResponse 修正 IssueResponse 构造(移除 isResolved)
- LogService.toIssueEventResponse 修正 ExceptionInfo 构造,JSON 字段反序列化为 Object
- LogController:assign 改为 @RequestBody;GET /issues 新增 assignee/environment 参数;upload 新增 bundleVersion 参数
- WebhookService:事件类型匹配改为 issue.created/issue.fatal/issue.error/issue.warning/issue.updated;新增 HMAC-SHA256 X-BugCollect-Signature 签名;toResponse 修正为 hasSecret
- SourcemapService:按平台生成正确后缀(.android.bundle.map/.ios.bundle.map);新增 bundleVersion 参数;200MB 大小限制;.map 扩展名校验
- V4 迁移 SQL:log_issue_users 表、log_webhooks.secret 列、log_sessions 表、event_id 索引

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 09:26:12 +08:00
XuqmGroup
696a50aae8 fix(bugcollect): getIssueDetail 补全 events 列表,修复 Web 控制台事件列表为空
toIssueResponse 中 events 始终传 null,导致 GET /issues/{id} 返回的 events 字段为空。
getIssueDetail 现在主动查询最近 20 条 IssueEvent 并填充到响应中。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 08:48:48 +08:00
XuqmGroup
dcd429c52d feat(bugcollect): 更新 API 端点并改进数据结构
- 将 Android SDK 的 mapping 上传端点从 /log/v1/sourcemaps/upload 更改为 /bugcollect/v1/sourcemaps/upload
- 将 RN SDK 的 API 端点从 /log/v1/ 统一更改为 /bugcollect/v1/
- 在 LogQueue.ts 的请求体中添加 sentAt 时间戳和 SDK 信息
- 重构 BugCollect.ts 中的事件结构,将 appVersion 重命名为 release,添加 environment 和 sdk 字段
- 将 JS 错误上报的类型从 js_error 改为 issue,并调整错误级别分类
- 为 warn 和 info 方法添加完整的 issue 事件结构
- 在 types.ts 中添加新的数据类型定义,包括 Level、Platform、SdkInfo、ExceptionInfo 等
- 为 IssueEvent 添加详细的异常信息结构,包括类型、值和堆栈跟踪
- 添加完整的错误收集 API v1 规范审阅报告文档
- 在数据库迁移脚本中为日志表添加新字段,包括级别、环境、设备信息、SDK 信息等
2026-06-17 18:02:10 +08:00
XuqmGroup
7c360c407b fix(bugcollect): WebhookService 使用 getRelease() 替代不存在的 getAppVersion()
LogIssueEntity 无 getAppVersion(),应使用 getRelease(),
导致上次 Jenkins 构建编译失败。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 15:35:34 +08:00
XuqmGroup
198dc7f960 feat(bugcollect): implement BugCollect API v1.1.0 full stack
- LogController: 新增 /issues/{id}/events, /issues/{id}/trend, 管理接口
  (resolve/ignore/assign/bulk),queryIssues 改用 level/status/q 参数
- LogService: 全面重写,eventId 幂等、breadcrumbs 存储、affectedUsers 计数、
  Issue status 管理、getIssueEvents/getIssueTrend 独立接口
- Entity: LogIssueEventEntity 增加 eventId/exceptionType/exceptionValue/breadcrumbs;
  LogIssueEntity 增加 status/affectedUsers/assignee;LogEventEntity 增加 eventId
- Repository: LogIssueEventRepository/LogIssueRepository/LogEventRepository 新增
  idempotency/filter/trend/bulk 查询方法
- DTO: IssueActionRequest/IssueTrendResponse 新增;IssueResponse/IssueEventResponse 扩展
- V3 migration: log_issue_events/log_issues/log_events 结构升级

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 15:30:05 +08:00
XuqmGroup
5b020525ac refactor: xuqm-log-service → xuqm-bugcollect-service
- 目录/包名/API路径/数据库/容器名全部重命名
- 26个Java文件包名 com.xuqm.log → com.xuqm.bugcollect
- API前缀 /log/v1/ → /bugcollect/v1/
- mvn compile 通过

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 17:39:13 +08:00