Skip to content

Feat/req resp archive#3650

Closed
MxyEI wants to merge 31 commits into
Wei-Shaw:mainfrom
MxyEI:feat/req-resp-archive
Closed

Feat/req resp archive#3650
MxyEI wants to merge 31 commits into
Wei-Shaw:mainfrom
MxyEI:feat/req-resp-archive

Conversation

@MxyEI

@MxyEI MxyEI commented Jul 2, 2026

Copy link
Copy Markdown

No description provided.

MxyEI and others added 27 commits June 7, 2026 12:36
将每次网关请求体+响应体异步落盘,按天目录分片、zstd 流式压缩,
便于月末拉到本地长期保存。默认关闭(archive.enabled=false),开启前零开销。

要点:
- ArchiveService:单 writer 协程 + 有界字节队列 + 边写边 zstd 压缩
  + 按天/MaxShardSize 切片 + 磁盘水位停写 + 优雅关闭。
- 响应捕获中间件:包裹 c.Writer 的 tee writer,接口嵌入自动保留
  Flusher/Size,流式/非流式响应一并捕获,不改动任何 streaming 代码。
- 7 个 HTTP 落点接入(OpenAI Responses WebSocket 因连接被 Hijack 跳过)。
- 隐私红线:IP 仅 SHA256(salt+IP);不存上游域名/密钥/原始 IP;
  请求/响应 header 走白名单(默认拒绝)。
- DI 接线 + wire 重新生成;新增 archive 配置段。
- 运维件:tools/archive-pull.sh(rsync 增量拉取)+ 使用文档。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@liangcaijv

Copy link
Copy Markdown

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jul 6, 2026
@MxyEI MxyEI closed this Jul 9, 2026
@MxyEI MxyEI deleted the feat/req-resp-archive branch July 9, 2026 18:41
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