Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

fix(events): 全链缺时间/关联元数据——事件、SSE 帧、span、日志拼不回同一条时间线

已关闭
#117 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
32/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
observability

调研方向

Start with the AgentEvent enum at src/event.rs:28-275 to see every variant that would need ts_ms/seq/session_id/turn, then read the SSE framing at src/handlers.rs:1329-1352, where no id: is set despite the step-concatenation advice. Cross-check the per-turn step counter at src/run_core.rs:1331 and the dead Span::current().record at src/runtime.rs:266-272 alongside the agent.turn log at runtime.rs:332-336. Done means events carry a monotonic seq and wall clock, SSE frames emit id:, and the host builds a per-turn span with field::Empty declarations so spans and logs join on session_id. Runtime verification needs Langfuse (#124).

由索引模型根据 Issue 内容生成。

描述

场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:无 · 验收:代码 diff 逐点核对;运行时可见性另需 Langfuse(#124)

基线 origin/main = fc29f3d4。(与 #97 互补:即便补 Last-Event-ID,id 也不含墙钟与回合语义。)

Summary

  • AgentEvent 全枚举(src/event.rs:28-275)无 timestamp/seq/turn/session_id;step 每 turn 从 1 重数(run_core.rs:1331),而 SSE 注释教客户端"concatenate deltas keyed on step"(handlers.rs:1350-1352)——goal-loop 多 turn 时 step 撞号。
  • SSE 帧 Event::default().event(t).data(d) 无 id:(handlers.rs:1329-1332)。
  • Span::current().record("session_id", ...)(src/runtime.rs:266-272)是死写入——全仓无 field::Empty 声明、宿主不建 root span,tracing 对未声明字段静默忽略;agent.run.complete 日志(run_core.rs:647-655)无 session 字段——多会话 HTTP 服务里 agent.turn: finished(runtime.rs:332-336)无法归属。

建议

事件统一 envelope(ts_ms + 单调 seq + session_id + turn),SSE id: 直接承载;宿主建 per-turn span 并声明字段后 record。

主要语言
Rust
星标
4
派生
0
平均合并
5 小时 32 分钟
30 天内合并 PR
7

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

jeffkit/recursive 的其他 Issue

查看 jeffkit/recursive 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。