Repository navigation
Description
Describe the bug
[Feature Request] Add a dedicated audit trace log file ai_resource_trace.log for AI resource lifecycle operations in Nacos version 3.2.1.2026.03.30.
(功能请求:为 Nacos 3.2.1.2026.03.30 版本新增专用审计追踪日志文件 ai_resource_trace.log,用于记录 AI 资源版本的全生命周期操作。)
Expected behavior
The system should automatically record structured trace entries into ai_resource_trace.log whenever an operator interacts with AI resources/versions. Each log entry must clearly capture:
- Who: Operator ID / Username
- When: Timestamp (ISO 8601 format)
- Which Resource: Resource ID/Name & Target Version
- What Operation: Action type and execution result
Supported operations should include, but not be limited to:
CREATE_DRAFT,UPLOAD_SKILL,REVIEW_REJECTED,REVIEW_APPROVED,REVIEW_FORCE_SKIP,SET_TAG,REMOVE_TAG,OFFLINE_VERSION,DELETE_VERSION, etc.
(系统应在操作 AI 资源/版本时自动向ai_resource_trace.log写入结构化日志。每条日志需清晰记录:操作人、时间戳、资源标识及版本、操作类型与结果。涵盖的操作包括:创建草稿、上传 Skill、审核不通过、审核通过、审核强制跳过、设置标签、移除标签、下线资源版本、删除版本等。)
Actually behavior
Currently, these operations are either logged in the generic application log (nacos.log), scattered across different modules, or lack a unified, structured format. There is no dedicated, easily queryable audit trail specifically for AI resource version operations, making compliance auditing, security tracing, and troubleshooting inefficient.
(目前这些操作要么记录在通用的 nacos.log 中,要么分散在不同模块,缺乏统一的结构化格式。没有专门针对 AI 资源版本操作的审计追踪日志,导致合规审计、安全溯源和问题排查效率低下。)
How to Reproduce
Steps to demonstrate the current limitation:
- Log in to Nacos console or call API to perform AI resource operations (e.g., create draft, upload skill, approve/reject review, delete version).
- Check the default log directory (
logs/). - Observe that no dedicated
ai_resource_trace.logexists, and relevant operation traces are mixed with other system logs, making it difficult to filter by operator, resource, or operation type.
(复现当前局限性的步骤:1. 执行 AI 资源操作;2. 检查日志目录;3. 发现无专用日志文件,操作记录混杂在系统日志中,难以按操作人、资源或操作类型过滤。)
Desktop (please complete the following information):
- OS: Any (Linux/Windows/macOS)
- Version: nacos-server 3.2.1.2026.03.30
- Module: AI Resource Management / Config & Audit
- SDK: N/A (Server-side logging feature)
Additional context
- Suggested Log Format: JSON or KV pair for easy parsing by ELK/Loki. Example:
{"timestamp":"2026-03-30T10:15:30Z","operator":"admin_01","resource_id":"res-ai-001","version":"v1.2.0","operation":"REVIEW_APPROVED","status":"SUCCESS","ip":"192.168.1.100"} - Log Rotation: Recommend standard size/time-based rotation (e.g.,
ai_resource_trace.log.2026-03-30) to prevent disk overflow. - Compliance: This feature is critical for enterprise security audits and operational traceability.
- Implementation Hint: Can leverage existing AOP/interceptor mechanisms in Nacos to capture controller/service layer calls and route them to a dedicated
RollingFileAppenderwith a custom logger name (e.g.,AI_RESOURCE_TRACE).
Activity
saynoword commentedon Apr 2, 2026
I'd like to work on this issue.
[ISSUE alibaba#14833] Add dedicated trace log for AI resource operations
[ISSUE alibaba#14833] Add dedicated trace log for AI resource operations
[ISSUE alibaba#14833] Add dedicated trace log for AI resource operations
[ISSUE #14833] Add AI resource trace logging and fix prompt bizTags h…
YutShang commentedon Apr 9, 2026
Hi maintainers, I noticed that PR #14852 already introduced AI resource trace logging at the service/operation layer.
I’m planning a follow-up contribution focused specifically on ai_resource_version persistence-layer coverage (both external DB and embedded Derby implementations), so that row-level DB write outcomes are traceable as well.
Proposed scope:
AiResourceTraceServiceandai-resource-trace.log(no new logger format)insert,update*,delete*)resourceType,name,version,sqlOperation,rowsAffected, and error message inextWould this scope be acceptable for issue #14833, or do you prefer a different boundary?
cxhello commentedon Apr 10, 2026
/assign
github-actions commentedon Apr 10, 2026
This issue is currently assigned to @saynoword. Please wait for it to become available or discuss in the comments.
此 Issue 当前已分配给 @saynoword,请等待其释放或在评论中沟通。
github-actions commentedon Apr 14, 2026
@saynoword, this issue has been assigned to you for 11 days with no update.
It will be unassigned in 3 days if there is no progress.
Please comment with a status update or submit a PR.
@saynoword,此 Issue 已分配给您 11 天但暂无进展更新。
如果 3 天内没有进展,将自动取消分配。
请回复进展状态或提交 PR。
github-actions commentedon Apr 18, 2026
@saynoword has been unassigned due to 14 days of inactivity.
This issue is now available for anyone to claim. Comment
/assignto pick it up.由于 14 天未更新进展,@saynoword 已被自动取消分配。
此 Issue 现在可供任何人认领,评论
/assign即可认领。