Skip to content

fix: incorrect l7 metrics#11455

Draft
yuanchaoa wants to merge 1 commit intomainfrom
fix-incorrect-l7-metrics
Draft

fix: incorrect l7 metrics#11455
yuanchaoa wants to merge 1 commit intomainfrom
fix-incorrect-l7-metrics

Conversation

@yuanchaoa
Copy link
Contributor

@yuanchaoa yuanchaoa commented Mar 12, 2026

This PR is for:

  • Agent

fix: incorrect l7 metrics

Steps to reproduce the bug

Changes to fix the bug

  • 问题是HTTPv1的请求和响应都能正常解析,但是HTTP响应没有生成对应的L7Stats

Affected branches

  • main
  • 6.6

Checklist

  • Added unit test to verify the fix.
  • Verified eBPF program runs successfully on linux 4.14.x.
  • Verified eBPF program runs successfully on linux 4.19.x.
  • Verified eBPF program runs successfully on linux 5.2.x.
    =

@yuanchaoa
Copy link
Contributor Author

@claude review一下这个提交

@claude
Copy link
Contributor

claude bot commented Mar 12, 2026

Claude finished @yuanchaoa's task in 30m 6s —— View job


I'll analyze this and get back to you.

@yuanchaoa
Copy link
Contributor Author

@claude review一下这个提交

@claude
Copy link
Contributor

claude bot commented Mar 12, 2026

Claude Code is working…

I'll analyze this and get back to you.

View job run

@yuanchaoa yuanchaoa force-pushed the fix-incorrect-l7-metrics branch from cc4ecbc to 198026c Compare March 12, 2026 02:27
@yuanchaoa
Copy link
Contributor Author

@claude review一下这个提交,问题是HTTPv1的请求和响应都能正常解析,但是HTTP响应没有生成对应的L7Stats;看一下这个提交是否能解决这个问题

@claude
Copy link
Contributor

claude bot commented Mar 12, 2026

Claude Code is working…

I'll analyze this and get back to you.

View job run

@yuanchaoa yuanchaoa force-pushed the fix-incorrect-l7-metrics branch 3 times, most recently from 930a889 to a48878c Compare March 12, 2026 06:34
@kylewanginchina kylewanginchina force-pushed the fix-incorrect-l7-metrics branch from a48878c to 090e711 Compare March 12, 2026 07:21
@kylewanginchina
Copy link
Contributor

@claude review一下当前代码

@claude
Copy link
Contributor

claude bot commented Mar 12, 2026

Claude finished @kylewanginchina's task in 3m 9s —— View job


Todo

  • Read CLAUDE.md and repo guidelines (none found)
  • Review PR diff and relevant code
  • Provide review feedback

Summary

Reviewed the change in agent/src/common/l7_protocol_log.rs:352-362 that relaxes request/response ordering from strict </> to <=/>=.

Review

  • ✅ This looks correct for the reported bug: when request/response share the same timestamp (coarse time resolution or batching), the prior strict comparison would skip pairing and drop response stats. Allowing equality lets the pair be matched and still computes rrt = 0 as expected.
  • 💡 Optional: consider adding a small regression test that constructs two LogCache entries with identical time and verifies L7PerfStats counts include the response. This would lock in the fix.

@yuanchaoa yuanchaoa marked this pull request as draft March 12, 2026 08:12
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.

3 participants