Feat/req resp archive#3650
Closed
MxyEI wants to merge 31 commits into
Closed
Conversation
This reverts commit eba25df.
将每次网关请求体+响应体异步落盘,按天目录分片、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>
Contributor
|
All contributors have signed the CLA. ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.