Skip to content

feat: 审计日志增加scen,scen_code,scen_desc字段,支撑上层应用使用 --story=129221126#8595

Open
yuyudeqiu wants to merge 2 commits intoTencentBlueKing:v3.14.xfrom
yuyudeqiu:dev_auditlog
Open

feat: 审计日志增加scen,scen_code,scen_desc字段,支撑上层应用使用 --story=129221126#8595
yuyudeqiu wants to merge 2 commits intoTencentBlueKing:v3.14.xfrom
yuyudeqiu:dev_auditlog

Conversation

@yuyudeqiu
Copy link
Contributor

审计日志场景字段功能实现

需求

为审计日志增加 scene(场景)、scene_desc(场景描述)、scene_code(场景代码)三个字段,用于标识操作来源场景。

修改文件清单

文件 修改内容
definitions.go 字段常量定义
metadata/audit.go 数据结构增加字段
header/header.go Header 常量定义
header/accessor.go Getter 函数
header/util/util.go Header 复制逻辑
coreservice/audit.go 从 Header 提取并保存
topo_server/auditlog.go 查询条件和返回字段
upgrader/.../add_audit_scene_index.go 创建索引
upgrader/.../pkg.go 注册升级脚本
admin_server/imports.go 导入升级脚本

@yuyudeqiu yuyudeqiu changed the base branch from master to v3.14.x January 26, 2026 05:46
@Anna-shine
Copy link
Collaborator

commit补充一下tapd单据信息

@yuyudeqiu
Copy link
Contributor Author

commit补充一下tapd单据信息

已补充重新提交

@yuyudeqiu yuyudeqiu changed the title feat: 审计日志增加scen,scen_code,scen_desc字段,支撑上层应用使用 feat: 审计日志增加scen,scen_code,scen_desc字段,支撑上层应用使用 --story=129221126 Mar 9, 2026
Comment on lines +44 to +46
httpheader.SetScene(newHeader, httpheader.GetScene(header))
httpheader.SetSceneDesc(newHeader, httpheader.GetSceneDesc(header))
httpheader.SetSceneCode(newHeader, httpheader.GetSceneCode(header))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不要放在header里去实现

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原本定的方案是放到header里面,是否放到body中更合适?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前的技术实现方案没有对过,这个场景不适合放在header里
可以修改一下技术方案,评审通过后再编码提交~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants